-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
Expected behavior
When cycling through options in a closed select with the up and down keys, I'd expect the MdOptionSelectionChange
to have isUserInput == true
Current behavior
isUserInput
is only true when selected from an open select.
Reproduction
http://plnkr.co/edit/YQn77sSXj60cNwLYldOC?p=preview
What is the use-case or motivation for changing an existing behavior?
I want to trigger an event when the user
- Opens the select and changes the value with mouse or keyboard
- Opens the select and reselects the current value mouse or keyboard
- Cycles to a new option while the select is closed
It's easy to achieve 1 and 3 with the the select's (change)
event. In order to get 2, I have to instead watch each option's (onSelectionChange)
event and filter by event.source.selected
. At this point, I cannot tell the difference between changes made by the ControlValueAccessor interface or by the user cycling through the closed select.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest (c2816ef)
Is there anything else we should know?
I may be misinterpreting the use of isUserInput
but it would seem that cycling through a closed select would be considered "selection coming from the user".