Allow comma sign in TagsInput

Is there a way, to allow a comma sign in an TagsInput value? As soon as I enter a comma sign "," in the TagsInput, the tag is added. But I just wanna add for example names as tags in the format - "John, Doe" - "Foo, Bar" - "Jean-Claude, Van-Cool" So is there a way, do disable tag recognition with ",", and just use Enter (or change it to semicolon)
2 Replies
Simon
Simon13mo ago
@bernhard the TagsInput accepts a ->splitKeys([]) (at least in v3) method which means it will ONLY use Enter unless you define some other keys in that array, e.g.
TagsInput::make('tags')->splitKeys(['Tab', ',']);
TagsInput::make('tags')->splitKeys(['Tab', ',']);
I just tested this myself on v3 and without the splitKeys method I am able to use a comma in my tags without it completing a tag
bernhard
bernhardOP13mo ago
@Simon Thanks! I had a closer look at that, at the meanwhile and in V2 its hardcoded
x-on:keydown.enter.stop.prevent="createTag()"
x-on:keydown.,.stop.prevent="createTag()"
x-on:keydown.enter.stop.prevent="createTag()"
x-on:keydown.,.stop.prevent="createTag()"
Want results from more Discord servers?
Add your server