Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cdk/listbox): error with multiple preselected values #25621

Merged
merged 1 commit into from Sep 11, 2022

Commits on Sep 10, 2022

  1. fix(cdk/listbox): error with multiple preselected values

    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 angular#25611.
    crisbeto committed Sep 10, 2022
    Copy the full SHA
    29d5712 View commit details
    Browse the repository at this point in the history