Provide a general summary of the issue here
React Aria Combobox Docs state there is no default for defaultFilter, but there actually seems to be the "contains" filter set.
FYI, in our case fuzzy filtering happens in backend, so always want to show all suggestions.
🤔 Expected Behavior?
There should not be any filter set by default and/or the Docs need to reflect actual behaviour.
😯 Current Behavior
Assuming we have example from the Docs, but we chainge the content of the first item to "A_ardvark" instead of "Aardvark".
<ComboBox
label="Animal"
placeholder="e.g. Cat"
name="animal"
isRequired
description="Please select an animal.">
<ComboBoxItem id="aardvark">Aardvark</ComboBoxItem>
<ComboBoxItem id="cat">Cat</ComboBoxItem>
<ComboBoxItem id="dog">Dog</ComboBoxItem>
<ComboBoxItem id="kangaroo">_Kangaroo</ComboBoxItem>
<ComboBoxItem id="panda">Panda</ComboBoxItem>
<ComboBoxItem id="snake">Snake</ComboBoxItem>
</ComboBox>
When typing "aa" in the combobox, the suggestions does not show up.
Overriding with defaultFilter={undefined} does not change that (iMO it should), but defaultFilter={()=>true} fixes it, all suggestions are rendered.
💁 Possible Solution
Either don't set a defaultFilter or if doing so, document that and make it overridable by setting undefined.
🔦 Context
No response
🖥️ Steps to Reproduce
- Open Example in Stackblitz
- change
<ComboBoxItem id="aardvark">Aardvark</ComboBoxItem> to <ComboBoxItem id="aardvark">A_ardvark</ComboBoxItem>
- type "aa" in the Combobox
Version
1.16.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
MacOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
Provide a general summary of the issue here
React Aria Combobox Docs state there is no default for
defaultFilter, but there actually seems to be the "contains" filter set.FYI, in our case fuzzy filtering happens in backend, so always want to show all suggestions.
🤔 Expected Behavior?
There should not be any filter set by default and/or the Docs need to reflect actual behaviour.
😯 Current Behavior
Assuming we have example from the Docs, but we chainge the content of the first item to "A_ardvark" instead of "Aardvark".
When typing "aa" in the combobox, the suggestions does not show up.
Overriding with
defaultFilter={undefined}does not change that (iMO it should), but defaultFilter={()=>true} fixes it, all suggestions are rendered.💁 Possible Solution
Either don't set a
defaultFilteror if doing so, document that and make it overridable by settingundefined.🔦 Context
No response
🖥️ Steps to Reproduce
<ComboBoxItem id="aardvark">Aardvark</ComboBoxItem>to<ComboBoxItem id="aardvark">A_ardvark</ComboBoxItem>Version
1.16.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
MacOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response