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

Support for Space as separator in InputTag as prop #2

Open
vraja-pro opened this issue Jan 2, 2023 · 1 comment
Open

Support for Space as separator in InputTag as prop #2

vraja-pro opened this issue Jan 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@vraja-pro
Copy link

vraja-pro commented Jan 2, 2023

In Additional URL parameters to allow space should not be allowed.
Should auto-create tags when you hit space, as URL parameters/keys won't/can't ever have space characters in them.

  • Add support as prop for TagInput and enable it in Additional URL parameters to allow.

  • Update TagInput story.

Connected to issue #317

Image

@d-claassen
Copy link
Contributor

d-claassen commented Jan 12, 2024

Making the list of separators dynamic sounds like a good idea. If someone wants to allow commas in their tag, they'll also want to configure that.

An option to prevent adding spaces in a tag would be to make the component support more generic validation. Pass an actual Event instance to the onAddTag and onRemoveTag handlers of the component. Set the value of those events to the text of the tag value. Then support the event.preventDefault() function being called by returning early if we see that event.isDefaultPrevent() is set to true.

@d-claassen d-claassen added the enhancement New feature or request label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants