Show HN: Grid.js – Advanced table library that works everywhere (2020)
gridjs.io
gridjs.io
Nowadays “advanced” seems to be a static array or rows that can be sorted by a column.
that said I believe non linear display like ehlib is probably handled through subtrees/nested-components in the react world
In the era you describe, table libraries could connect to a backend data store via queries, then the layers of machinery could figure out how to write changes back to the data store (either automatically, or with developer hinting on complex cases). Sometimes with a setting to choose between optimistic or pessimistic concurrency, etc.
I suspect the next big wave of web app development technology will span client+server tiers, keep most of today's advantages, and re-add the higher-level abstractions from that era. Best case, this will meaningfully reduce application development cost and time.
Wish I could find this on an open source grid.
<button tabindex="0" role="button" title="Next" aria-label="Next" class="">Next</button>
There are ARIA attributes, which is good. But the values for tabindex, role, title, and aria-label all are redundant and could just be removed. On the other hand, there is no aria-controls or similar that would explain what this button actually does.
So no, the authors have not really thought about accessibility.
This is a repost of a show HN from 2020?
Or this is a new show HN of a project that hasn't been touched since 2020?
Something else?
(Live-updating views of tabular data retrieved via an SQL query are a requirement that I've been looking for a PHP/Laravel-JS solution for, but maybe there's something better in the pure-JS world for it. Should I be looking at a solution like Meteor, FeathersJS, or Phoenix LiveView?)
edit: Wow, I just looked at AG-Grid mentioned in other comments, and the first example is a live-updating table ("Live Streaming Updates"). But it doesn't seem to provide server-side diffing of the source data...guess I'll have to handle that manually in application logic by making the frontend request rows with id > the last id it has.
On input, convert that row back to JSON and diff it. Did it change? Mark the row as "changed". (You can skip the diffing to keep it simple and just mark it changed on input, but then it will keep it marked as changed even if you restore the original value.)
On save, run document.querySelectorAll('tr.changed'), convert them back to JSON and send to backend.
Doing everything with vanilla JS and DOM manipulation is a bit gnarly though (in terms of the readability/maintainability of the resulting code), I would be surprised if there isn't an elegant solution out there for this already.
Of course by the time I was done I realized I could have just taught my client how to use Ultorg... but this was more fun :)
I just completed my own task by getting the frontend to provide the latest row ID it has to the backend. Guess it was really simple since I didn't actually need to update existing records, just get new ones.
Ultorg looks like MS Access for general data sources (including Access itself as a data source). Developers just end up rebuilding existing ideas on new infrastructure, hah. We had the same requirement just a few weeks ago and ended up showing the business users how to use HeidiSQL :)
I had in mind something along the lines of query: "columnA: <5 && columnB: >=12" Or am I asking too much of the js ecosystem and should I go back to playing with excel?
Anyone any idea if there's a solution that does what I want?
I use it as UX improvement on my hugo blog (e.g. here https://pilabor.com/blog/2022/01/the-ultimate-boot-stick/) and it was pretty easy to integrate...
Maybe I'll try this one out just for fun...
Virtual Scrolling might be the deciding factor though. Is this supported? I couldn't find anything in the docs (on mobile)
Even browsers that don't have JavaScript? I sure hope so - after all, it's certainly not as if rendering tables is a solved problem since the 90s.