JavaScript Select Search Options

The JavaScript select control that Filament uses, Choices.js, uses Fuse.js for searching. The default options for Fuse only search the first 60 characters. If an option label has more the 60 characters, searching fails to find any results for that option. This default can be modified by setting fuseOptions on the Choices control. Does Filament have a way to set the fuseOptions on the Choices control? I poked around the repository and didn't see a way but figured I'd ask here. If not, can allowing these options to be set be added as a feature request?
1 Reply
BillTheFish
BillTheFishOP2mo ago
I did some poking around and found this closed bug report from December 2023 which I think is caused by the same 60 character limit. https://github.com/filamentphp/filament/issues/10550 There's also a Fuse option, ignoreLocation, that will disable this limit and allow search to give results from labels of any length.
GitHub
Select searchable confused with HTML content · Issue #10550 · filam...
Package filament/forms Package Version 3.1.29 Laravel Version 10.10 Livewire Version No response PHP Version 8.2 Problem description When I create a relation form select, that is searchable and use...
Want results from more Discord servers?
Add your server