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

Being more productive by pressing ENTER #219

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

acataluddi
Copy link

@acataluddi acataluddi commented Sep 4, 2020

Hi Guys,

we hopefully added a small improvement to the widget logic to let user being more productive by using the keyboard.

Only when allowNew is false, we automatically select the first entry so that, should it be the right entry for you, you can immediately confirm by pressing ENTER. Otherwise, you can:

  • continue typing to increase the selectivity and filter the entries.
  • use the top/bottom arrows to select the suggested entries

In addition, we added the possibility to easily switch between the input control and the suggested values by pressing TAB.

Credits - Roberto Rizzo

Best regards,
Adriano C.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 27a70df on metagusto:use-tab-to-browse-suggestions into a9d7788 on i-like-robots:master.

@i-like-robots
Copy link
Owner

Thanks for your contribution @acataluddi. This feature has been suggested a few times over the years (#55) but it's always seemed confusing so I've avoided implementing it. I'll check out your branch and see how it works.

@i-like-robots i-like-robots self-assigned this Sep 17, 2020
@acataluddi
Copy link
Author

Thanks for your contribution @acataluddi. This feature has been suggested a few times over the years (#55) but it's always seemed confusing so I've avoided implementing it. I'll check out your branch and see how it works.

Hi Matt,

Sorry, we implemented the new behaviour without checking for any previous occurrence/request for this feature: our bad.

If I can elaborate a bit further the rationale behind this feature, the big plus of advanced selection widgets like react-tags, select2 and similar is, in my opinion, to speed up the item search/selection by the keyboard. That said, is mega powerful having a way to immediately confirm a tag as soon as the typed chars are enough to select the desired one.

Arguably, there is no better key than the ENTER one for this.

Of course, when the allowNew property is true, this behaviour should be disabled as the user expectation would be instead to commit the type chars into a new tag.

This is the behaviour implemented in this pull request.

Thank you for checking it,
Adriano C.

@i-like-robots i-like-robots added this to the 7.0.0 milestone Oct 1, 2020
@joscaohenri
Copy link

Hello guys, is this feature not implemented on 6.1.0? For some reason I can't use it! Thanks for the great library!

@acataluddi
Copy link
Author

Hello guys, is this feature not implemented on 6.1.0? For some reason I can't use it! Thanks for the great library!

Hi @joscaohenri,

As you can see, the branch has not yet been merged (status open), so it can be part of any release. I’m sorry.

In the meantime, you might want to use our internal company version:
https://github.com/metagusto/react-tags

Regards,
Adriano

@sepsol
Copy link

sepsol commented Jun 1, 2021

Still waiting for this to be merged 👀

@juanlet
Copy link

juanlet commented Jun 25, 2021

@i-like-robots Could you merge this? There are several people waiting for this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants