Table Component by row or by column?
When working on a complex data table component what is a better standard? By column or by row?
I had this debate with a teammate who strongly believes tables should be pieced together by column components. The basis of this argument is that it’s easier to manipulate if you need to add or remove columns to the table. I lean more towards building tables by rows as it translates more to development and is easier to add/remove rows if necessary.
Is there some standards or best practices for crafting Table components out there? I’ve checked on YouTube but it’s a mixed bag. Some build by columns, some build by rows.
Posted Jan 30, 2023, 9:40 PM UTC
I build by cell, but group by columns.
Auto layout with columns makes it easier to move or remove data as opposed to row.
Especially true since stakeholders or customers care more about the order of the data headers and less about randomly generated data in row cells.
Yeah, I agree with that point 100% that’s why I became so conflicted. The need to manipulate the order or contents of the table columns is far more important than add/removing arbitrary number of rows.
However, i find that add/removing rows happens more frequently in my case. Which becomes more resource intensive.
Thanks for your input! Very helpful! 🙌
I'd suggest starting with the maximum number of rows to fill the screen.
If you need to show less, then just crop the table.
Btw, if you're not already using Mockaroo for generating realistic data I highly recommend it.