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

option_limit of MultiChoice widget doesn't work when typing initials #2665

Closed
zhh210 opened this issue Aug 26, 2021 · 1 comment · Fixed by #2827
Closed

option_limit of MultiChoice widget doesn't work when typing initials #2665

zhh210 opened this issue Aug 26, 2021 · 1 comment · Fixed by #2827

Comments

@zhh210
Copy link

zhh210 commented Aug 26, 2021

The option_limit allows specifying how many items to display in the MultiChoice widget. When setting it > 4, it works when nothing is in the input widget:

image

However, when any string is used to search item initials, only 4 items will be displayed.
image

Is it possible to allow option_limit to work when searching from the choices?

@ingebert
Copy link
Contributor

ingebert commented Sep 4, 2021

Thanks for pointing out. I was about to post the same issue.
Also without setting option_limit it would be helpful, to be able to scroll through all proposed list items after filtering with search string.
Edit:
This seems to be a standard setting (searchResultLimit:4) from the choices.js that is used for this widget, coming from bokeh;
bokeh/bokeh#10525 (comment)
Unfortunately I am a total noob regarding JS, so I couldn´t find out a workaround (for example modify the multichoice.js file in "Lib\site-packages\bokeh\server\static\js\lib\models\widgets\MultiChoice.js" and reset the option. I guess the JS code is compiled at some point, I don´t know).

Edit2:
As a workaround (ugly, I know), I replaced the standard value for "searchResultLimit" in
"\Lib\site-packages\bokeh\server\static\js\bokeh-widgets.min.js" from 4 to the desired value (for example 100) and it worked.

philippjfr pushed a commit that referenced this issue Oct 15, 2021
Resolves #2665. 
Parameter can be accessed from Bokeh Version 2.4.1
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

Successfully merging a pull request may close this issue.

2 participants