windmill-react-ui icon indicating copy to clipboard operation
windmill-react-ui copied to clipboard

TableFooter could use <tfoot> ?

Open Glidias opened this issue 3 years ago • 2 comments

Reproduction:

Run <TableFooter> within <Table>.

Problem description:

index.js:1 Warning: validateDOMNesting(...): <div> cannot appear as a child of <tfoot>.
    at div
    at http://localhost:3000/static/js/vendors~main.chunk.js:4627:21
    at tfoot
    at table
    at div
    at http://localhost:3000/static/js/vendors~main.chunk.js:4340:21
    at div

Suggested solution:

Use <tfoot> element instead of plain div element for TableFooter component.

Glidias avatar Feb 22 '22 06:02 Glidias

Changed from <div> to <tfoot>. https://github.com/narimanb/wreactui

narimanb avatar Jul 03 '23 04:07 narimanb

Actually, according to the documentation under <TableFooter>, it could be a generic <div> since it can be placed under TableContainer as in the example https://windmillui.com/react-ui/components/table#table-footer

However, it would be good if there was an option to choose tag between "div" | "tfoot" tag as that might come in useful depending on where you're placing it. Besides "div", may even | "footer" for html5 sementic-preference.

Glidias avatar Sep 21 '23 07:09 Glidias