3 ms·
This sounds tough. A common solution, which qualifies as “janky”, is to render sticky rows in a <div> element, completely separate from the <table> itself. If
by divbzero 6y ago
This sounds tough.
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 https://www.datatables.net
[2]: https://react-table.js.org 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>.
- capableweb 6y agoThe implementation here would decide if this is "janky" or not as in web-dev circles, "janky" specifically refers to stuttering, lag, juddering and such, not in general something that is "hacky" (poor or ad-hoc solution). 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.