Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Choices.js Select Dropdown component outputs wrong results in static search #6009

Open
celu opened this issue Feb 12, 2025 · 0 comments
Assignees

Comments

@celu
Copy link

celu commented Feb 12, 2025

Describe the bug
When searching in the select dropdowns filtering by a single character the results do not filter well, sometimes other values come up that do not even contain that letter. However this behavior does not occur when searching >= to two characters.

Version/Branch
Formiojs v5.0.1, also tried in latest 4.X.X version.

To Reproduce
Steps to reproduce the behavior:

  1. Open a form that contains a drop-down “select” type component and consumes JSON data from an external url.
  2. Enable static search in select component with a default Threshold of 0.3 (also tried with 0.0). Then save.
  3. Display a drop-down in formio renderer and type one character in the search box.
  4. Observe the results displayed in the selector.

Expected behavior
Results containing that character are displayed and no results are displayed if the search does not match.

Screenshots
Fomio error

Additional context
The bug also occurs in https://formio.github.io/formio.js/app/examples/select.html "External source" example, when you search "s", some results like Accord, Civic... are displayed.

I've also tried settings choices.js settings with a  "searchFloor": 0, but it keeps happenings with some characters like "s", while others like "m" don't fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants