Skip to content

Commit 1b0265c

Browse files
authored
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.
1 parent 7021954 commit 1b0265c

File tree

3 files changed

+143
-119
lines changed

3 files changed

+143
-119
lines changed

0 commit comments

Comments
 (0)