News for hackers. Stuff that matters.
Re:Show HN: A simple React table library using CSS Grid Layout by SahAssar on Sunday March 04, 2018 @04:03PM (#16516709)
Why wouldn't you use proper tables for tables?
Re:Show HN: A simple React table library using CSS Grid Layout by rehemiau on Sunday March 04, 2018 @05:25PM (#16517154)
+1 There are many problems with html tables (like inconsistent buggy implementations between browsers) but grids don't fix them and introduce other problems. You can't group cells in rows / columns html elements. You can't write a simple css selector for a particular cell. You can't easily refer to a whole row with a css selector. You can't do stuff like "highlight the whole row on hover" because you wouldn't have a parent element to select. Grids are for grid layouts, and with current feature set they can't replace tables.
Re:Show HN: A simple React table library using CSS Grid Layout by brentburg on Sunday March 04, 2018 @08:54PM (#16518125)
Exactly! Recreating the visual layout of a table is only half of the problem. You also need to think about making it accessible (which this component does not appear to attempt). You could get the for free by just using the proper semantic element.
Re:Show HN: A simple React table library using CSS Grid Layout by noonespecial on Monday March 05, 2018 @12:44AM (#16519021)
Ruby, Sass, React, yarn, Node... Its like a game of how many dependencies can we require to make a <table>.

Seriously though, are we running off the rails here? Are we going back to the bad old days of perl "page generators", just replacing a dozen CPAN commands with a bunch or yarn's, gems, and npm's instead? I'm starting to wonder.

Re:Show HN: A simple React table library using CSS Grid Layout by ben_jones on Sunday March 04, 2018 @04:13PM (#16516778)
Bulk table rendering can have a performance impact on your app and a more minimal implementation may be desired
Re:Show HN: A simple React table library using CSS Grid Layout by SahAssar on Sunday March 04, 2018 @04:50PM (#16516989)
Then the fix is to only render the rows currently in the viewport, right? Seems weird to recreate tables using CSS for that reason.
Re:Show HN: A simple React table library using CSS Grid Layout by _sdegutis on Sunday March 04, 2018 @07:55PM (#16517882)
Dunno why you’re downvoted. Noticed this too, if you have a table with slow loading content then the whole thing doesn’t render until all of it can render.
Re:Show HN: A simple React table library using CSS Grid Layout by tuespetre on Monday March 05, 2018 @12:45AM (#16519026)
Interesting, does `table-layout: fixed` have any effect?
Re:Show HN: A simple React table library using CSS Grid Layout by slaymaker1907 on Sunday March 04, 2018 @06:56PM (#16517610)
Grids are much easier to do if you want to have smart scaling (i.e. benefits of Flexbox over more traditional layouts).
Re:Show HN: A simple React table library using CSS Grid Layout by throwaway66666 on Sunday March 04, 2018 @04:22PM (#16516836)
tables are evil /s