# Dash\_table - "row\_index" style\_cell\_conditional bug

**URL:** <https://community.plotly.com/t/dash-table-row-index-style-cell-conditional-bug/24308>\
**Category:** Dash Python\
**Created:** [June 8, 2019, 6:08am UTC](https://community.plotly.com/t/dash-table-row-index-style-cell-conditional-bug/24308 "2019-06-08T06:08:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcsewhoy](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mcsewhoy/32/6972_2.png) [@mcsewhoy](https://community.plotly.com/u/mcsewhoy)\
**Post date:** [June 8, 2019, 6:08am UTC](https://community.plotly.com/t/dash-table-row-index-style-cell-conditional-bug/24308/1 "2019-06-08T06:08:21Z")

</div>

Love Plotly and Dash, thanks so much for your effort with this.

I have picked up what I think is a wee bug. When I backgroundColor any row\_index, using style\_cell\_conditional, not only does the appropriate row get backgroundColoured, but so does the “filtering” row up the top of the datatable, as with a couple of other cells in the top left (see screenshot attached)

Don’t think this is meant to happen, but thought i’d bring it up for future patches. See code below.

thanks  
Marcus

html.Div([  
dash\_table.DataTable(  
id=‘table’,  
columns=column\_deets,  
data = initial\_data,  
style\_table={‘overflowX’: ‘scroll’},  
**style\_cell\_conditional=[**  
{  
**’if’: {‘row\_index’: 3},**  
‘backgroundColor’: ‘#3D9970’,

```
                                    }   
                                ],
                                editable=True,
                                filtering=True,
                                sorting=True,
                                sorting_type="multi",
                                row_selectable="multi",
                                row_deletable=True
                              )
                    ],style = {'margin-left':15,'margin-right':15}),

```

![Capture](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/1/1ce759af89c6638e957eb6e4060a0eeee6400409.jpeg)

---

<div class="post-metadata">

**Author:** ![mcsewhoy](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mcsewhoy/32/6972_2.png) [@mcsewhoy](https://community.plotly.com/u/mcsewhoy)\
**Post date:** [June 8, 2019, 6:43am UTC](https://community.plotly.com/t/dash-table-row-index-style-cell-conditional-bug/24308/2 "2019-06-08T06:43:53Z")

</div>

ok I have solved this myself,

if I use style\_data\_conditional= instead of style\_cell\_conditional=, it works fine. But maybe the style\_cell\_conditional one should be fixed anyway.

thanks  
Marcus
