Fuzzy Search does not search under Groups
See original GitHub issueAs the title suggests, it does not. Per with example below, when I type “Display” to the search bar, it returns “Not found”. It does, however, search group value fields.
To Reproduce
const options = [
{
type: "group",
name: "Sans",
value: "sans",
items: [
{ name: "Display", value: "Display" },
{ name: "Helvetica", value: "Helvetica" },
{ name: "Playfair Display", value: "Playfair Display" }
],
},
{
type: "group",
name: "Serif",
value: "serif",
items: [
{ name: "Hallelujah", value: "Hallelujah" },
{ name: "Gloria Hallelujah", value: "Gloria Hallelujah" },
{ name: "VT323", value: "VT323" }
],
},
];
const [selectedFonts, setSelectedFonts] = useState<string[]>([]);
<SelectSearch
options={options}
search={true}
filterOptions={fuzzySearch}
emptyMessage="Not found"
multiple={true}
closeOnSelect={false}
printOptions="on-focus"
placeholder="Choose Fonts"
onChange={setSelectedFonts as any}
/>
Expected behavior Search should also search under the group items.
Screenshots Before search: After search:
Desktop:
- OS: Windows 10
- Browser: Firefox
- Version: 87.0
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
There's more to fuzzy search than correcting typos | Algolia Blog
Fuzzy search matches words even if there are typos or misspellings, and fuzzy matching finds information based on similarities.
Read more >Fuzzy Search feature does not work correctly with searchBE ...
searchBE function does not work correctly in case of Fuzzy search on BE. Exact matching works correctly. For instance, REST call does not...
Read more >What is a Fuzzy Search? - TechTarget
A fuzzy search is performed using a fuzzy matching algorithm, which returns a list of results based on likely relevance even though search...
Read more >fuzzy matching of nested data (ex: individuals \in families \in ...
I am trying to match the groups in D1 and D2 based on having the most families matched. Family matches are defined by...
Read more >How to Use Fuzzy Searches in Elasticsearch | Elastic Blog
Fuzzy queries can most easily be performed through additional arguments to the match query type, as seen in the example below this paragraph ......
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
@icaroscherma Sweet work around!
And yes @yigitlevent , the built-in function should work with nested items as well. Seems something broke on the latest major release. Will take a look. Thanks for the report, appreciated!
I’ve message @tbleckert this morning once I figured that it might be a good idea to include
items.name
,items.value
, so in future versions you might get away with defaultfuzzySearch
. =)I’m happy to help. =)