F
Filamentβ€’14mo ago
Craig Potter

Pasting in to a tagsInput splits a string

I'm not sure if this is a feature or a bug but if you have a simple tagsInput field and you paste a string in, it appears to be splitting it in to different tags
TagsInput::make('test');
TagsInput::make('test');
Is this the correct functionality or is there a way to stop it so it just accepts the entire string ?
Solution:
Looks like it was already reported and fixed - https://github.com/filamentphp/filament/issues/9313
GitHub
Each character automatically becoming tags when pasting in a TagsIn...
Package filament/filament Package Version v3.0.0 Laravel Version v10.10 Livewire Version No response PHP Version 8.2 Problem description When pasting texts into the TagsInput field, every character...
Jump to solution
5 Replies
DrByte
DrByteβ€’14mo ago
Does adding ->debounce(500) help?
carloscapote
carloscapoteβ€’14mo ago
I'm not the original poster but I arrived here because I was facing the same issue. I just tried adding ->debounce(500) but it keeps happening. I've tested this with the latest versions of the framework Filament (3.0-stable), Laravel (10.10) and it happens both in Firefox and Chrome.
awcodes
awcodesβ€’14mo ago
This is definitely a bug. Please report it on GitHub. πŸ™‚
Craig Potter
Craig PotterOPβ€’13mo ago
Hahaha sorry @awcodes only just saw your reply. I will try and report it on GH later today. I did find a semi-work around however for anyone experiencing the same issue. @carloscapote If you add ->splitKeys([' ']) it appears to work e.g.
TagsInput::make('test')->splitKeys([' '])
TagsInput::make('test')->splitKeys([' '])
This wouldn't work if you have spaces in your tags but for single word tags it appears to work for now.
Solution
Craig Potter
Craig Potterβ€’13mo ago
Looks like it was already reported and fixed - https://github.com/filamentphp/filament/issues/9313
GitHub
Each character automatically becoming tags when pasting in a TagsIn...
Package filament/filament Package Version v3.0.0 Laravel Version v10.10 Livewire Version No response PHP Version 8.2 Problem description When pasting texts into the TagsInput field, every character...
Want results from more Discord servers?
Add your server