Lurker News

Comments (132) 38 threads

Show all comments

Showing thread 1 of 38

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