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

Freezing complete data table on scroll

I am trying to create a fixed data table that should be always freezed( top) on scroll? Can someone help me with this? I have tried

style={position: fixed} for the data table that didn’t help. Any suggestions would be appreciated

Hi @gudiya_009
What are you trying to do? Are you trying to freeze the header?

No, I am trying to freeze the complete table

See fixed_rows parameter in DataTable. Documentation here.

fixed_rows ( dict ; default { headers: false, data: 0 } ): fixed_rows will “fix” the set of rows so that they remain visible when scrolling vertically down the table. fixed_rows fixes rows from top-to-bottom, starting from the headers. If headers is False, no rows are fixed. If headers is True, all header and filter rows (see filter_action ) are fixed. Additional data rows can be fixed by assigning a number to data

Try using that parameter. If it doesn’t work, let me know.