facebookarchive / fixed-data-table

A React table component designed to allow presenting thousands of rows of data.

Home Page:http://facebook.github.io/fixed-data-table/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work 'rowClassNameGetter'

rayozerets opened this issue · comments

I try use rowClassNameGetter, but it is not working. What am I doing wrong?
JS:

    _rowClassNameGetter(index) {
        return 'selected-row'; // selected?'selected':''
    }
    <Table
    ...
    rowClassNameGetter={this._rowClassNameGetter}
    ...
>

CSS

.selected-row {
  background: red;
}

Actually it probably is working but the background isn't going to show up because the cells have a default background set already.

I had this problem as well so to work around it I override the provided classes with the following:

.public_fixedDataTableCell_main,
.public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main {
    background-color: inherit;
}

Try adding color: lime; or something to that class and see what happens then.

Thank you very much!