Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
18 stars 31 forks source link

Grid has multiple <tbody> elements in the same table #1851

Open Febakke opened 9 months ago

Febakke commented 9 months ago

Description of the bug

Found by SSBs UU testing 🥇 Each row in our grid has a tbody. Based on HTML documentation a tbody is the main content of a table.

The HTML element encapsulates a set of table rows ( elements), indicating that they comprise the body of a table's (main) data.

You can have multiple tbodybut they would typicly have their own headers. Indicating different sections in the table.

Steps To Reproduce

Go to a grid and inspect it See that all rows have their own tbody

Additional Information

No response

olemartinorg commented 1 month ago

Fixed in #2513, but this appears in the console now:

Warning: validateDOMNesting(...): <tr> cannot appear as a child of <table>. Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.

:cry:

See this for more info: https://github.com/facebook/react/issues/5652#issuecomment-164175731

What do you think, @adamhaeger @Magnusrm?