Open vraja-pro opened 1 year ago
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
.
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 inAdditional URL parameters to allow
.Update
TagInput
story.Connected to issue #317