✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Select and deselect checklist with button

I want to make a button for selecting and deselctin all the parameter in checklist. I have a problem with output type of my callback function.

output('checklist1', 'value')
...
if n_clicks % 2 = 0:
     out_state=['1','2','3']
else:
     out_state=[]
return{
       out_state
}

I can’t find how to send properties correctly, help me please

Welcome to Dash @Andahay .
The documentation on Dash button and Dash checklist is pretty comprehensive. You can also see these tutorials I made on checklists and button components. Those things explain the basics. I’m sure after your read the documentation or see the vidoes, you’ll get a solid understanding of how theses components work.

1 Like

Has it been considered to add select/deselect functionality to the component itself? It’s a rather common usage pattern.

1 Like

yeah it’s a good idea. similarly for drop downs.

1 Like

Thank you for videos, they were very useful. But i stil got my problem. After running my app i got an error unhashable type: ‘list’. I can’t understand there is the problem
P.s. i’ve already read the documentation for both components and sending the list of strings, as it should be

@Andahay
Can you please paste your code and give access to some of your data. I’ll test it out on my end and see if I get the same error.