searchFloor and search text filter interaction
See original GitHub issueI’ve recently started a new project with Choices (latest version), and I’m noticing a strange behaviour in filtering.
With a near-default setup:
I’m getting these two sets of behaviour on standard single-choice select boxes:
I managed to narrow it down to the minimum character - based on the above two outcomes (and the fact that other random strings such as zz
don’t show any results), it appears to only be searching on the characters above the minimum search length (i.e. +
and a
)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
searchFloor and search text filter interaction #135 - GitHub
I've recently started a new project with Choices (latest version), and I'm noticing a strange behaviour in filtering.
Read more >Search filter by entering text and select all afterwards - Possible?
Click Select all under the list and enter your search text in the search bar ... It should be possible to select only...
Read more >Power BI Custom Visuals - Text Filter - YouTube
Try our On-Demand Training Platform for free! Get your 7-day trial here: http://success.pragmaticworks.com/learn-power-biIn this module, ...
Read more >Using the Text Filter Node - SAS Help Center
In the Interactive Filter Viewer, type software in the Search text box, and click Apply. Interactive Filter Viewer. The Documents table provides ...
Read more >overture albuquerque floor plans
Explore our luxury 55+ apartments in Albuquerque today to find your next home. ... View Floorplans View Interactive Map Search Filter Move-in Date...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lewishowles Choices uses
fuse
, a fuzzy-matching string search which allows for typos. By default, the fuzziness is very lenient, which can lead to confusing results. It sounds like what you’re looking for is exact string matching.If you’re looking for exact matching from the beginning of the string, instruct fuse to accept only exact matches by giving it a fuzziness threshold of 0:
If instead you’re looking for exact matching but from anywhere in the string, AFAIK fuse doesn’t support this directly but you can hack it. Fuse calculates the fuziness of a result as a function of correctness and distance (i.e. offset), so you can tell it to accept a low fuziness threshold and give it a high distance parameter, which causes distance to be weighted very lightly:
Note that if your fields are very long, you may have to tweak the above parameters somewhat.
The solution from https://github.com/jshjohnson/Choices/issues/135#issuecomment-302124496 works. Thanks. Would be good to have this as an example.