Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdk/listbox): error with multiple preselected values (#25621)
The CDK listbox had a subscription to its model changes in the constructor which fires immediately due to the `startsWith` and which was attempting to sort the selected values when in multiple selection mode. The problem is that the options aren't available until `ngAfterContentInit` which was causing an error when we tried to do the sorting. These changes move the change event subscription to `ngAfterContentInit` so that options are guaranteed to be defined when it fires. Fixes #25611.
- Loading branch information