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

[Select mode="tags"] Add the ability to use the Enter key as a tokenSeparator #28872

Closed
1 task done
geoffrey opened this issue Jan 14, 2021 · 4 comments
Closed
1 task done
Labels
Inactive 🤔 Need Reproduce We cannot reproduce your problem

Comments

@geoffrey
Copy link

geoffrey commented Jan 14, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

This will allow adding a tag to the Select input after pressing the Enter key

What does the proposed API look like?

adding tokenSeparators support for 
 or 


@geoffrey geoffrey changed the title Select tag mode: use Enter key as a tokenSeparator Select mode="tags": use Enter key as a tokenSeparator Jan 15, 2021
@geoffrey geoffrey changed the title Select mode="tags": use Enter key as a tokenSeparator [Select mode="tags"] Add the ability to use the Enter key as a tokenSeparator Jan 19, 2021
@chillyistkult
Copy link
Contributor

It already works like that

https://codepen.io/pen/?&editors=001

tokenSeparators is meant to parse the value as tags. For example if comma separated string is passed as a value.

@geoffrey
Copy link
Author

Do you mind sending an example where we can add a tag to the list by pressing the enter key?

@gsavit
Copy link

gsavit commented Feb 18, 2022

A year later, if you (or anyone else) still needs this... I just discovered that adding newline (i.e. '\n') to your tokenSeparators should get you the behaviour you're looking for!

@afc163 afc163 added the 🤔 Need Reproduce We cannot reproduce your problem label Apr 28, 2022
@github-actions
Copy link
Contributor

Hello @geoffrey. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @geoffrey, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。

@github-actions github-actions bot closed this as completed May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inactive 🤔 Need Reproduce We cannot reproduce your problem
Projects
None yet
Development

No branches or pull requests

4 participants