You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I posted this over on Discord but it's probably more useful here.
Choices.js uses Fuse.js for the search feature. Per the Fuse.js documentation, the default search options only search the first 60 characters of the option label (or value if that option is set). This means that if you have an option label and the string you are searching for occurs after 60 character mark, the search feature will fail to find any result for that option. This default can be modified by setting fuseOptions on the Choices control.
While I can certainly create my own Select class/plugin with a property, blade template, and JS that allows these options to be set, I think it would be useful if this functionality was built into the core Select components.
I also did some poking around and found this issue: #10550
I think the error this user was experiencing is a result of the above limitation and not a bug in Choice,js
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I posted this over on Discord but it's probably more useful here.
Choices.js uses Fuse.js for the search feature. Per the Fuse.js documentation, the default search options only search the first 60 characters of the option label (or value if that option is set). This means that if you have an option label and the string you are searching for occurs after 60 character mark, the search feature will fail to find any result for that option. This default can be modified by setting fuseOptions on the Choices control.
Here's a pen highlighting the above:
https://codepen.io/billthefish/pen/BaXqqQN
While I can certainly create my own Select class/plugin with a property, blade template, and JS that allows these options to be set, I think it would be useful if this functionality was built into the core Select components.
I also did some poking around and found this issue:
#10550
I think the error this user was experiencing is a result of the above limitation and not a bug in Choice,js
Beta Was this translation helpful? Give feedback.
All reactions