Marcas
October 17, 2020, 7:24pm
1
some_list = ['A', 'B']
.
.
.
dcc.Checklist( id='checklist_1',
options={'label': 'LabA', 'value': 'valueA'}
value=['A'],
inputStyle={'cursor':'pointer'},
)
Is it possible to dynamically change layout property from outside app.layout declaration?
For example, can I change content of ‘options’, of just ‘label’, from within callback when app is running.
My tests suggest that app.layout is read only once at initialization but want to confirm if I’m correct.
Hi @Marcas
Yes, you can update any of the properties of this component in a callback.
Marcas
October 17, 2020, 10:35pm
3
AnnMarieW,
can you show me how or point me to some source, pls.
See the example called “Dash App With Chained Callbacks” on this page: https://dash.plotly.com/basic-callbacks
The example updates the options and value properties of dcc.RadioItems, but it works the same way with dcc.Checklist
Marcas
October 19, 2020, 2:46pm
5
…daaaa.
Too much screen time, I guess.
To say the truth I was looking for a way to change properties by modifying app.layout directly.
Anyway, thanks AnnMarieW, I didn’t see what was in front of me all the time.