Disable floating header and 'fit to container'
MattPurland opened this issue · comments
I would like the datatable to act more like a standard table, so no floating header or size constraints based on the container. Can this be added?
Just figured out I could do this with some hacky CSS:
.datatable {
height: auto !important;
.dt-table {
height: auto !important;
}
}
Reopening as I believe it's probably a good idea to do this properly using a setting as I'm having issues with how the floating header renders its column widths
Thanks for your feedback.
I'm thinking of an elegant way to handle this use case
Thanks, I might take a look myself and submit a PR if that helps/I can find time
This could be set with an option like scrollY: false
The table would then be drawn in a standard way without a floating header.
A lot of javascript avoided with that option.
I keep you informed here
New setting to disable the floating header: { scrollY: false }
At the same time it removes the "fit to conatainer" feature
There is a limitation on filtering columns so I created an optionnal <ColumnFilterInputs/>
component.
Demo : ScrollY
This is great, thanks.
The only issue I can see (so far) is that when sorting, the 'asc' or 'desc' class isn't removed from previous columns unless you click on a new sorting column twice
Indeed, this has been fixed in 0.1.25