Skip to content
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

[BUG] multi selection with search does not refocus the search field after selection #265

Closed
bulldog98 opened this issue Sep 19, 2020 · 4 comments · Fixed by #267
Closed
Labels
bug Something isn't working
Milestone

Comments

@bulldog98
Copy link
Contributor

Describe the bug
If you try out the multiselect example it does not refocus the search field after making the selection, this is bad for keyboard oriented use.

To Reproduce

  1. Go to https://stackblitz.com/github/bithost-gmbh/ngx-mat-select-search-example?file=src%2Fapp%2Fapp.component.html
  2. Go to the example with multiselect
  3. Type something in the search
  4. Select one item with an enter keypress
  5. Try to get back to the search bar --> not possible except using escape and an enter to reopen the search

Expected behavior
If pressing escape or some other common key you should be able to refocus the search field to search for another item

@bulldog98 bulldog98 added the bug Something isn't working label Sep 19, 2020
@macjohnny
Copy link
Member

@bulldog98 thanks for reporting this issue.
would you like to contribute a fix for this?

@bulldog98
Copy link
Contributor Author

I'll have a look into it in the weekend.

@bulldog98
Copy link
Contributor Author

bulldog98 commented Sep 25, 2020

I had a look into it and the behaviour I want for single select works with enableClearOnEscapePressed set to true, but this does not work with multi set to true on the mat-select.

bulldog98 added a commit to bulldog98/ngx-mat-select-search that referenced this issue Sep 26, 2020
bulldog98 added a commit to bulldog98/ngx-mat-select-search that referenced this issue Sep 26, 2020
bulldog98 added a commit to bulldog98/ngx-mat-select-search that referenced this issue Sep 26, 2020
bulldog98 added a commit to bulldog98/ngx-mat-select-search that referenced this issue Sep 26, 2020
macjohnny added a commit to bulldog98/ngx-mat-select-search that referenced this issue Oct 17, 2020
macjohnny added a commit that referenced this issue Oct 17, 2020
#267)

* (fix) in multi select mode after enter the search is not focused (#265)

* fixup! (fix) in multi select mode after enter the search is not focused (#265)

Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
@macjohnny macjohnny added this to the 3.1.1 milestone Oct 17, 2020
@macjohnny
Copy link
Member

the fix was release with version 3.1.1
thanks @bulldog98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants