-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P5The team acknowledges the request but does not plan to address it, it remains open for discussionThe team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/selectneeds: discussionFurther discussion with the team is needed before proceedingFurther discussion with the team is needed before proceeding
Description
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue
Steps to reproduce:
- Add two mat-selects with the same selector (e.g. id="test") but different ancestor selectors to a page. Both should be multiple-selects. Add 3 options in the first select and no options in the second.
- Write code that sets options of second select whenever selection within first select changes, so that the second select always contains only the options that are selected in the first select.
- Use test harness to click one option in first select, then use following code on the second test harness to check that only the single option is available:
await select.open();
const optionLabels = Promise.all((await select.getOptions()).map(option => option.getText()));Expected Behavior
What behavior were you expecting to see?
- There should only be one option in the second select.
Actual Behavior
What behavior did you actually see?
- The options returned by the second select are the same as in the first - i.e. 3 options - even though when inspecting the component instance, I have verified that the options are correct (just one option).
Environment
- Angular: 9.1.7
- CDK/Material: 9.2.3
- Browser(s): Chrome v80
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 10.15
Metadata
Metadata
Assignees
Labels
P5The team acknowledges the request but does not plan to address it, it remains open for discussionThe team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/selectneeds: discussionFurther discussion with the team is needed before proceedingFurther discussion with the team is needed before proceeding