Is there a way to implement multi-level headers in Fixed Data Table 2
LiuChuan-g opened this issue · 3 comments
Unfortunately we only support 2 levels of headers at this point.
There's a long term goal to support multi-level headers but we haven't made any traction for it in a while.
Some discussions we had in the past can be seen at #237 and #27 (comment).
With that said, you should be able to stitch/render 2 (or more) separate table instances such that each header is rendered by a different table.
You can then sync their horizontal scroll offsets so they functionally and visually behave like a single table to the end user.
We have used this approach in one of our internal applications to simulate pinned/fixed rows and vertically spanned headers.
I can cook up a codesandbox example in the next day or two if that helps.
You can then sync their horizontal scroll offsets so they functionally and visually behave like a single table to the end user.
We have used this approach in one of our internal applications to simulate pinned/fixed rows and vertically spanned headers.
I can cook up a codesandbox example in the next day or two if that helps.
@LiuChuan-g , here's a very hacky PoC that does the job: https://codesandbox.io/s/fdt2-multi-level-spanned-headers-poc-f8gt0w?file=/src/index.js.
Feel free to play around and ping me if anything is unclear.
You can then sync their horizontal scroll offsets so they functionally and visually behave like a single table to the end user.
We have used this approach in one of our internal applications to simulate pinned/fixed rows and vertically spanned headers.
I can cook up a codesandbox example in the next day or two if that helps.@LiuChuan-g , here's a very hacky PoC that does the job: https://codesandbox.io/s/fdt2-multi-level-spanned-headers-poc-f8gt0w?file=/src/index.js. Feel free to play around and ping me if anything is unclear.
help me lot!!! you must be a genius.