-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-autocomplete. Selected item not updated when using mouse #1513
Comments
Also reported by @kyleledbetter - The input doesn't seem to be updating when you make a selection from the dropdown: tested Chrome 40.0.2214.111 & Safari 8.0.3 (10600.3.18) |
+1 |
2 similar comments
+1 |
+1 |
@robertmesserle I submitted a PR for this. |
Ref #1527. |
Hello Thomas, how are you? You called the "md-item-text" property? She is responsible for inserting the selected item in input e.g
I think this may help. |
If you set md-item-text="item.display" then the text is set correctly but the request for autocomplete is fired again because the search text is updated. This shows the dropdown again. When an item from the drop down is selected, the autocompletion should not happen again |
Hello, swati615. Naturally this does not occur, it may be something in your code. You would show it, please? |
This occurs when there are two options in the dropdown where one is a substring of the other.
|
+1 |
1 similar comment
+1 |
+1 |
I was having this same issue and it turns out that it was during the async
and changed it too -
where my projectsPromise and googleLocationsPromise are just serpeate async calls. This may not be THE cause of the issue, but it fixed things for me, and I hope it helps someone else. |
to recreate. navigate to here. https://material.angularjs.org/#/demo/material.components.autocomplete
type 'a' in the search box
Using the mouse click on 'Arizona'
The selected text is not updated to state 'Arizona', it stays at 'a'
If you use the 'return' keyboard key to select an item, the selected text is updated to the selection correctly.
The text was updated successfully, but these errors were encountered: