select and drop down don't tree-shake igxForOf
#13677
Labels
🐛 bug
Any issue that describes a bug
dropdown
optimization
select
Select component
version: 17.0.x
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Description
The Select and Dropdown components use declarative items that are normally iterated. The Dropdown optionally support those items to be iterated using the
igxFor
directive to create a virtualized dropdown items list - for that reason it references directly theIgxForOfDirective
to react if it's used and that prevents it from being tree-shaken out even when it's not needed. The Select component by extending the Dropdown inherits the same issue.Steps to reproduce
For example in the bundle-test project in the repo:
Result
Expected result
The
igxFor
directive and supporting classes should not be included () in the resulting build bundle.The components should reference the directive using a lightweight injection token (https://angular.io/guide/lightweight-injection-tokens) to allow it to be tree-shaken.
The text was updated successfully, but these errors were encountered: