Lurker News

Comments (132) 38 threads

afshinmeh12 replies#
Hello folks :wave:

I’m Afshin, the creator of Grid.js.
Grid.js is an open-source table library written in TypeScript and published under MIT license.
My goal is to develop a framework agnostic table library that:
- Works everywhere. You don’t need a specific framework to use Grid.js
- Lightweight and easy to use
- Fully documented and tested
- Developer friendly. Grid.js is written in TypeScript! Supports all modern web browsers
Please take a look at the examples (https://gridjs.io/docs/examples/hello-world) section and let us know if you have any suggestions.
Although Grid.js is currently designed to work with web-browsers, I’m actively thinking and working on adding other integrations like React Native (see https://gridjs.io/docs/philosophy)
Please let me know if you have any suggestions or comments. Happy hacking! :computer:

w-ll1 reply#
It looks like sorting / pagination is all down client side which forces a download of all the rows, how well does this support tables with 10s or 100s of thousands of rows?
afshinmeh2 replies#
Correct. I have a PR ready which integrates the sort, search and pagination with the server-side module. Currently, there is a Server Side module that pulls data from the server (https://gridjs.io/docs/examples/server).
freedomben1 reply#
when you say "server-side" do you mean this is typescript that runs on the server? thus requiring a node-based server?

Continue this thread — 1 reply

_bxg1#
Quick tip: for the client-side, large dataset case, if you want to get fancy it's possible to create a worker thread and perform the sort there, which makes it somewhat faster but more importantly stops it from freezing up the tab while it operates. We did this to great success at my last company when we needed to sort ~200,000 items client-side. The UI thread remained perfectly responsive during the operation and we were able to present the user with a loading spinner while it worked.
pea1 reply#
Great work - really clean documentation, and it looks beautiful!

We currently use `react-table`, which is good in that it can support some reasonably large datasets (for instance, here's 2 million rows on the client-side - https://datapane.com/leo/reports/table-test/ - a bit laggy with sorting, but passable). This may not be the use-case you're going after at all, but have you run any benchmarks for how big a dataset you can support?

afshinmeh1 reply#
Thanks! Appreciate your feedback.

Well, it is on our roadmap! With Grid.js you will be able to sort, search or process data in a separate thread (Web Worker) and then pass the results to the main thread to render.
I'm also thinking about lazy-loading the table rows. Both the Web Worker bit and lazy-loading will be added in a week or two.

pea1 reply#
Cool! Have you checked out https://github.com/bvaughn/react-virtualized too? Might be totally useless to you, but I think they've done a lot under the hood to optimise table loading.

Congrats again on a beautiful product.

Continue this thread — 1 reply

afshinmeh2 replies#
Oh great! I guess the columns are not properly rendered because there are a lot of columns. That looks like a bug to me. I just created two issues and will release a bug fix soon.

Thanks!

robertlagrant#
> Oh great!

The correct response :-)

simonw#
Awesome :)
nightski#
I took a look at it appears the observable notebook has a stylesheet defined with a table element style that sets a table's max-width to 640px. That is why it is not expanding to fill the width. (I am not associated with the project)
simonw#
That's awesome - fast turnaround too! Thanks for the fix.
XCSme1 reply#
Your documentation is really cool, what did you use to make it?
afshinmeh#
Yes!
hn_12341 reply#
Is there any load testing benchmark results available. if so can you share ?
afshinmeh#
I haven't created a performance report yet but I will definitely create one and add it to the docs. Good point.
fbnlsr1 reply#
Definitely going to try this. I've been using Datatables with Vue but it's not the most user friendly. Thanks for your work!
afshinmeh#
Cheers!
hazz99#
This looks fantastic! I'm going to start using it immediately. Thankyou for your hard work.
naveen_#
It's not mobile friendly.
dandare#
I am excited to use the vanilla JS version in my project, thanks for not being React only :)

Continue this thread — 3 more replies

Bishonen882 replies#
Good effort! I'm not sure how 'advanced' it is though. I'd even go as far as call it 'simple'?

E.g. the following features would be required to make it advanced (list not complete):
- Export data (csv)
- Align columns based on their content
- Tree data (parent/child rows)
- Total rows
- Formatting applied based on data type (currency, numerical etc.)
- Reordering columns
- Resizing columns
- Hiding columns
- Optional filter field for every column
- Conditional formatting
- Tripple Sorting & Multiple sorting (sort by more than 1 column at a time)
- ... more
In the react world, I found this to be a good foundation for an 'advanced' table. Since it's rather inconsistently developed, I ended up forking it for myself and working on my own copy, removing unneeded elements and enhancing with everything else I do need.
https://material-table.com/

afshinmeh2 replies#
Thanks for your feedback.

I agree that Grid.js is not a full-featured plugin _yet_ and it's still missing essential features, like those that you mentioned but please bear in mind that:
- I have only released the first version of the library.
- I have been focusing on fundamental blocks of a lightweight _data processing_ library (see: https://github.com/grid-js/gridjs/tree/master/src/pipeline). That's what took most of my time.
- Grid.js is framework agnostic which is a bit different compared to other libs
The pipeline is very easy to extend and I'm confident that most of those features will be added soon.

Bishonen88#
I don't doubt that you can and possibly will make this a great library. It seems like a nice and clean foundation for one. I just commented on the word 'advanced' in the title. You admitted yourself that it's missing essential features, so advanced might be an adjective you'd want to use for release 2.0 ;)
datasage#
I do appreciate being framework agnostic. I think more common components like this would benefit from being built that way.
bubbab3 replies#
How accessible is Grid.js? The main differentiator between table libraries for me these days is accessibility. Many libraries and frameworks out there do it poorly. The better ones are often tied to company-specific frameworks.

From playing around a bit, I've at least noticed that sortable headers have no focus indicator, the "sort column ascending" text gets included in the column's accessible name, and un-sortable column headers are read as clickable by screen readers.
I would LOVE a framework-agnostic table library that's both lightweight and fully accessible. If there's a chance for Grid.js to take this in its philosophy, I would be all in!

ipsum2#
It seems like you know a lot about accessibility, have you considered contributing to the library?
afshinmeh#
That makes sense. thanks for the feedback.

I just created a ticket to work on this aspect of the library soon. I'd appreciate if you add your comments to https://github.com/grid-js/gridjs/issues/25 if you think there is any specific components that needs immediate improvement.

nohuhu#
> The better ones are often tied to company-specific frameworks.

That is because to implement accessibility in a grid/tree widget to a meaningful level, you need a lot of underlying code. Even in modern browsers. Source: implemented accessibility in Ext JS framework.
One of the most often asked questions from users of Ext JS was: hey, can we have the Grid widget without all the bloat? Sure, and ~95% of the framework exists so that the Grid can have its features and work reliably across all the browsers. You can probably do without the rest 5%, no biggie.

thrownaway9541 reply#
doesn't have the styling pizzazz, but man is this thing feature rich! thank you for posting.
btzll1 reply#
I have, it's amazing. The only thing it's missing is drag and drop to outside divs. Other than that, it's feature rich, very customizable and the best from all other js grids I tried.
olifolkerd#
That feature will be coming soon :)
joaodlf1 reply#
Yes! Tabulator is amazing.

Continue this thread — 1 reply

Continue this thread — 1 more reply

Load more comments