anvilistas / tabulator

Anvil Wrapper for Tabulator
MIT License
18 stars 5 forks source link

Can't make header row sticky with "maxHeight": "100%" #136

Closed thywo closed 9 months ago

thywo commented 10 months ago

Hi, I'm trying to make the header row of a table sticky. I've tried the "maxHeight": "100%", in self.tabulator.options but it doesn't work.

I've cloned the base example and just added maxHeight (https://anvil.works/build#clone:T5TRMSY2LC62X3DP=MZKGX37FGBU66KKP7UFFJAWM|null) but the header row is not sticky.

I have no knowledge of Javascript and only basic knowledge of this module so maybe I'm making a mistake.

Thank you.

s-cork commented 9 months ago

you need the tabulator instance to be in a fixed height container you can set a fixed height like "height": "400px", in the options this will make the table scrollable and also keep the header fixed

since the example is not in a fixed height container, it'll just grow to the size of the data