react-table-library
react-table-library copied to clipboard
Virtualized Table fails DOM nesting validation
Virtualized Table fails DOM nesting validation I am using the example in the docs https://react-table-library.com/?path=/docs/compact-table--virtualized
Warning: validateDOMNesting(...): <div> cannot appear as a child of <table>
Warning: validateDOMNesting(...): <thead> cannot appear as a child of <div>
Warning: validateDOMNesting(...): <tr> cannot appear as a child of <div>
Warning: validateDOMNesting(...): <div> cannot appear as a child of <tbody>
Warning: validateDOMNesting(...): <tbody> cannot appear as a child of <div>

I will update the docs, but try the following:
<Table layout={{ isDiv: true, fixedHeader: true }} ... other stuff>
Because in a virtualized table, there are div elements between the table elements, but semantically that's not allowed. Therefore we need to transform the whole table to div elements.
Let me know if this helps.
Did it help @MA-MacDonald ?
Closing this, because the solution to this issue is there.