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): incorrectly validating preselected value (#25893)
In #25856 the check that verifies the validity of the form control value was moved into `writeValue`. This works as expected for assignments after initialization, but it throws an error incorrectly if there is a preselected value, because `writeValue` will be called before the options are available. These changes resolve the issue by checking that the options have been initialized before throwing the error. (cherry picked from commit 166ed5e)
- Loading branch information
Showing
2 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters