1

I am following this example at official react-table sandbox. The rows are flashing in the example when I scroll and when you read online they propose to add style to divs, i.e. https://github.com/bvaughn/react-virtualized/issues/1327. But the author already did add style:

const RenderRow = React.useCallback(
({
    index,
    style
}) => {
    const row = rows[index]
    prepareRow(row)
    return ( <
        div {
            ...row.getRowProps({
                style, // Style added here.
            })
        }
        className = "tr" >
        {
            row.cells.map(cell => {
                return ( <
                    div {
                        ...cell.getCellProps()
                    }
                    className = "td" > {
                        cell.render('Cell')
                    } <
                    /div>
                )
            })
        } <
        /div>
    )
},
[prepareRow, rows]
)

But the rows are still flashing. Does anyone have any idea how to solve that flashing issue? Best Regards

Community
  • 1
  • 1
user1665355
  • 3,324
  • 8
  • 44
  • 84

1 Answers1

1

I think this behavior is naturally act of Javascript and you are doing right. When you "windowed" a table and scroll, Javascript need a little bit time for hide and show rows. So the flash come.

JayK
  • 141
  • 9