-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Fixed multiple Autocomplete Issues #548
Fixed multiple Autocomplete Issues #548
Conversation
SamProf#315 - clear button SamProf#430 SamProf#246 - partial SamProf#213
src/MatBlazor/Components/MatAutocompleteList/MatAutocompleteList.razor
Outdated
Show resolved
Hide resolved
One feature that works in the master branch but is now broken in develop, even before our recent changes is the select by enter key.
I have tested and I know the code is firing but it reports an error:
|
Thanks for the finding, I'll go to sleep now but I'll fix it tomorrow morning. :) |
…list result. Fixed some comments from CR
I checked and the error was reproducing since the beginning of that feature on WASM builds(on master too). The cause of that issue was that OnEnter a JS function was called on MatList to confirm the selection which tried to dispatch an event(MouseDown) that didn't work on WASM. I changed the behavior of how MatAutocompleteList is selecting an item on pressing enter(calling directly the Blazor method which sets the Selected Item) and cached the result to not query the entities every time when the user is pressing enter. As the selection behavior changes are helpful for server-side Blazor too as when the user is pressing enter, the server is not calling a js(in client) which should call another method in server to set the selected item and rerender them in the client (Client event-> Server process -> Client dispatch mouse down -> Server process -> Client display) but now it's directly Client(enter) -> Server(processing) -> Client(display). The caching is also helping when the state is changed but neither the search text nor the Items are changed to not reiterate the items. |
@sandrohanea this all looks great to me. I will merge and close all the issues: @lindespang or @SamProf It looks like we have @sandrohanea as the man for maintaining the AutoComplete 490, 406, 278, 315, 430, 213, 246 - Didn't tag as they were already referenced by @sandrohanea |
Issues Fixed:
#315
#430
#246 - partial
#213
Also as all of them were related to the edit form I added an example in the demo using the EditForm + MatAutocompleteList and validation for the selected option.
This feature is also resolved already so can be closed: #267