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

Dropdown - Activate a list of options only after a user enters more than the specified number of characters #5791

Closed
JaneSjs opened this issue Mar 17, 2023 · 1 comment · Fixed by #8443
Assignees
Labels
enhancement user issue An issue or bug reported by users
Milestone

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Mar 17, 2023

In the meantime, a Dropdown activates a drop-down list and starts searching for possible matches as long as users start typing in the search box.

To enhance the user experience, it is recommended to implement a minimum search character count for Dropdown questions. This feature will ensure that the Dropdown only starts searching for items once users have entered a specific number of characters, such as three. This approach will prevent the Dropdown from unnecessarily searching through a large list of items and will improve the search speed and accuracy. By implementing this feature, users can more efficiently navigate through the Dropdown menu and quickly find the desired item. Therefore, introducing a minimum search character count can significantly improve the overall usability of the Dropdown feature.

Original inquiry: T12379 - Dropdown - Activate a list of options only after a user enters more than the specified number of characters.

@JaneSjs
Copy link
Contributor Author

JaneSjs commented Jun 4, 2024

+1 https://surveyjs.answerdesk.io/internal/ticket/details/T18466

I don't need to limit the number of characters for making a request, I need to debounce the request (more context here regarding "debounce" https://dev.to/manishkc104/debounce-input-in-react-3726)
I tried to implement the debounce inside onChoicesLazyLoad event handler but that's where I get unexpected results with old values of the filter string… It would be nice that SurveyJS supports debouncing the lazy load event
For that it would need to provide a way to customize the debounce time (similar you do for the page size for the lazy load configuration)… So if you configure something like debounceTime: 1000 it means "onChoicesLazyLoad will be triggered after the user stops typing for 1000 miliseconds" (and of course with the last value of the input filter which is what I couldn't achieve with a custom debounce logic)

@JaneSjs JaneSjs added the user issue An issue or bug reported by users label Jun 5, 2024
OlgaLarina pushed a commit that referenced this issue Jun 19, 2024
…r enters more than the specified number of characters
@OlgaLarina OlgaLarina linked a pull request Jun 19, 2024 that will close this issue
OlgaLarina pushed a commit that referenced this issue Jun 20, 2024
…r enters more than the specified number of characters
tsv2013 pushed a commit that referenced this issue Jun 21, 2024
* work for #5791 Dropdown - Activate a list of options only after a user enters more than the specified number of characters

* work for #5791 Dropdown - Activate a list of options only after a user enters more than the specified number of characters

---------

Co-authored-by: OlgaLarina <[email protected]>
@OlgaLarina OlgaLarina added this to the v1.11.4 milestone Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement user issue An issue or bug reported by users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants