T
TanStack2y ago
deep-jade

Performant column resizing: why divs?

I have been implementing the "Column Resizing Performant" example and I got it working... but when it comes to making the table header sticky and having editable data (in the form of text fields and dropdowns) I am running into issues with the CSS. A few questions: - Are there any examples out there of making an editable and sticky header table using the performant div approach? - why does the example use divs instead of table elements?
3 Replies
wise-white
wise-white2y ago
you don't need to use divs. In fact, I encourage semantic table elements. Some examples use divs to show that you "can" use divs. It depends what you're building. You can use TanStack Table to build traditional tables, or "table-like" components. Like you might use it to build a list of cards instead of tables with cells.
deep-jade
deep-jadeOP2y ago
Follow up question: I am curious why the writer of the example for the performant table resizing didn't use semantic table elements. I'm curious if there are tradeoffs that weren't explained as the examples don't come with design reasoning lol
wise-white
wise-white2y ago
I just copied from the other column sizing example. I wanted the one that used flex styles. It's as simple as that I don't know why it's causing confusion.

Did you find this page helpful?