✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

DashTable - style_data_conditional

I try to implement highlighting rows after multiselcting them via check-boxes in each row.

From docs:

style_data_conditional (dict; optional):

  • row_index (number | a value equal to: ‘odd’, ‘even’ | list of numbers; optional) - column_editable (boolean; optional)

Now, first three options do work (number, odd, even) but when I try:

                        'if': {
                            'row_index': [3,5] 
                        'backgroundColor': 'green',

I got an error:

Invalid argument style_data_conditional[4].if.row_index passed into DataTable with ID “table_obj”.

I tried couple different approaches but nothing seems to work.

Latest version of dash


What I do wrong?