-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
MatAutocompleteTrigger panelClosingActions have inconsistent types. #7553
Labels
P2
The issue is important to a large percentage of users, with a workaround
Comments
josephperrott
added
the
P2
The issue is important to a large percentage of users, with a workaround
label
Oct 31, 2017
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Nov 18, 2017
Currently the `panelClosingActions` stream is typed to return a `MatOptionSelectionChange` event, however the real return data is `MatOptionSelectionChange|void|MouseEvent`, which makes it hard to use. These changes switch to emitting a `null` if nothing was selected or `MatOptionSelectionChange` if the user selected something. Fixes angular#7553.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 10, 2017
Currently the `panelClosingActions` stream is typed to return a `MatOptionSelectionChange` event, however the real return data is `MatOptionSelectionChange|void|MouseEvent`, which makes it hard to use. These changes switch to emitting a `null` if nothing was selected or `MatOptionSelectionChange` if the user selected something. Fixes angular#7553.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 22, 2017
Currently the `panelClosingActions` stream is typed to return a `MatOptionSelectionChange` event, however the real return data is `MatOptionSelectionChange|void|MouseEvent`, which makes it hard to use. These changes switch to emitting a `null` if nothing was selected or `MatOptionSelectionChange` if the user selected something. Fixes angular#7553.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Mar 30, 2018
Currently the `panelClosingActions` stream is typed to return a `MatOptionSelectionChange` event, however the real return data is `MatOptionSelectionChange|void|MouseEvent`, which makes it hard to use. These changes switch to emitting a `null` if nothing was selected or `MatOptionSelectionChange` if the user selected something. Fixes angular#7553.
tinayuangao
pushed a commit
that referenced
this issue
May 16, 2018
…8533) Currently the `panelClosingActions` stream is typed to return a `MatOptionSelectionChange` event, however the real return data is `MatOptionSelectionChange|void|MouseEvent`, which makes it hard to use. These changes switch to emitting a `null` if nothing was selected or `MatOptionSelectionChange` if the user selected something. Fixes #7553.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug, feature request, or proposal:
The actions emitted by the panelClosingActions are not consistent
What is the expected behavior?
All actions should be typed as MdOptionSelectionChange according to the type signature of the field.
What is the current behavior?
Depending on how the panel is closed, the following actions are emitted:
panelClosingActions
emits anundefined
panelClosingActions
emits aMouseEvent
panelClosingActions
emitsMdOptionSelectionChange
panelClosingActions
does not emit a valueEnter
press =>panelClosingActions
emitsMdOptionSelectionChange
Enter
press =>panelClosingActions
does not emit a valueEsc
=>panelClosingActions
does not emit a value (Although this might have been fixed by fix(autocomplete): emit closing action for escape keydown event #6250)What are the steps to reproduce?
https://plnkr.co/edit/FjX9XJD6NkxddNtRLngb?p=preview
What is the use-case or motivation for changing an existing behavior?
This inconsistency makes it very hard to actually use panelClosingActions as a reliable source for the actual value selected.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.3, Material2 beta.11, Chrome, Windows
The text was updated successfully, but these errors were encountered: