Some widgets do not re-render on value change

Hi!
When using widgets.MultiChoice, i noticed that change the value directly does not re-render the component - and i am forced to wrap the value change with either disable/enable or delete_button:true/false…
any other way to to trigger re-render on value change?

Hello! It would be super helpful if you could provide a minimal working example to reproduce what you’re attempting to do. Then others will be able to try it out themselves and we can discuss in more concrete terms. :slight_smile:

Sure!

import panel as pn
pn.extension() 
multi_choice = pn.widgets.MultiChoice(name='MultiSelect', value=['Apple', 'Pear'],
     options=['Apple', 'Banana', 'Pear', 'Strawberry'])

button = pn.widgets.Button(name='change')
def change_value(change):
    multi_choice.value = ['Banana']
button.on_click(change_value)
pn.Column(button, multi_choice, height=200)

Any news regarding this matter?

Looks like the same issue as https://github.com/bokeh/bokeh/issues/9927 which will have to be fixed in Bokeh.

1 Like