by divbzero · 6y ago · 0 comments
A common solution, which qualifies as “janky”, is to render sticky rows in a <div> element, completely separate from the <table> itself. If I remember correctly, DataTables [1] takes this approach for its sticky headers. React Table [2] takes a similar approach, and actually abandons <table> altogether by using <div> elements for table body, rows, and cells.
[1]: https://www.datatables.net
[2]: https://react-table.js.org
I haven’t seen many solutions for sticky columns, but the least bad solution might also be a “janky” separate <div>.
So if it's performant, it's not "janky" (again, in web-dev circles) but it could still be a "hacky" implementation, even without any jank. It's also different from "robust", so something can be not-janky but also not-robust.