You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
$ bokeh info
Python version : 3.8.1 (default, Dec 27 2019, 18:06:00)
IPython version : 7.12.0
Tornado version : 6.0.3
Bokeh version : 2.1.0
BokehJS static path : /usr/local/lib/python3.8/site-packages/bokeh/server/static
node.js version : v13.8.0
npm version : 6.13.7
OS: Mac OS X Catalina (10.15.5)
Browser: Google Chrome 83.0.4103.106 (Official Build) (64-bit)
Description of expected behaviour and the observed behaviour
The value property should be set automatically when setting the options property and should reflect what widget GUI shows.
Now the value property is not set automatically and must be set manually otherwise there will be inconsistency between what the value is and what GUI show
Complete, minimal, self-contained example code that reproduces the issue
@tony-bony I don't disagree that value should always be in sync with the displayed value. But what should the value change to when new options are set?
if the old value is still present in the new options list, presumably just keep it as is.
if the old value is removed from the options list, then what?
Then the value should be set to the value being displayed by the Bokeh Select widget: that is the first option's value. This is what user sees and this is in my opinion what the model value should be.
With the current callback code when I e.g. start with an empty select and then I set the options then the first option is displayed but the value remains empty.
and using the button I add the first option then the Select widget will display an empty selection (without generating an error) so decision was made in Bokeh to accept the non-existing value (why?) and to display an empty selection.
But each next button click makes the Select widget to display the recently added option however the value of Select widget still remains the same: why? even if it doesn't exist in options. Why? I can't find a logical explanation for doing it this way...?
I think it's OK for the widget to display an empty selection when a wrong value was used that doesn't exist in options, but the value should not be accepted and a warning should be generated in JS console or in Python. On the other hand if an option is displayed it should always correspond to the the internal value.
So if the options are set and the first option is displayed then the internal value should be in sync with it. If the value must remain empty than also the Select widget should show an empty selection.
ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
Description of expected behaviour and the observed behaviour
The
value
property should be set automatically when setting theoptions
property and should reflect what widget GUI shows.Now the
value
property is not set automatically and must be set manually otherwise there will be inconsistency between what thevalue
is and what GUI showComplete, minimal, self-contained example code that reproduces the issue
The text was updated successfully, but these errors were encountered: