Hacker News new | past | comments | ask | show | jobs | submit | more tannerlinsley's comments login

The beginning of your comment made me uneasy, but then you endorsed the library! Phew! Thanks!


Looks like a but with Codesandbox. I believe if you log in, it will bypass this bug. I'm speaking with CS about it as we speak.


bug


A plugin is currently in development to make this extremely easy and turn-key, but for now (since you control the rendering layer), you can do this on your own with a few lines of code in your table renderer.


What I did to merge cells but keep the headers the same was to just suppress rendering via

    if (isFakeColumn(cell.column.id)) {
      return <React.Fragment key={cell.column.id}></React.Fragment>;
    }
And then render it with another column:

    {cell.column.id === "title" ? (
      <>
        {cell.render("Cell")}
        <br />
        {row.cells[2].render("Cell")}
        <br />
        {row.cells[3].render("Cell")}
        {" · "}
        {row.cells[4].render("Cell")}
      </>
    ) : (
      cell.render("Cell")
    )}
There's probably a way to get at the lot via a string, but by index was quick and easy enough.

One thing I do have to complain about is the lack of native TypeScript support - there used to be types in the repo, but they got removed. And `prepareRow(row)` is a bit ugly, but nothing major and it's only a one-time call.


Yeah, I'm sorry that's the case now. Having the types as first-class citizens of the repo while the library was not written in TS or maintained by TS devs was a big mistake. They are still available (and will updated asap from some other great devs) in DT. The prepareRow function may be ugly, but not as ugly as a freakishly slow table with only a handful of rows and columns visible at once ;)


DM me on twitter and we can discuss more there. @tannerlinsley


At a glance features:

- Lightweight (5kb - 12kb+ depending on features used and tree-shaking) - Headless (100% customizable, Bring-your-own-UI) - Auto out of the box, fully controllable API - Sorting (Multi and Stable) - Filters - Pivoting & Aggregation - Row Selection - Row Expansion - Column Ordering - Animatable - Virtualizable - Resizable - Server-side/controlled data/state - Extensible via hook-based plugin system


That's awesome! Soo cool to see it in your product! About being nervous, I don't think you should be! I know it's intimidating moving to v7 from v6, but it's pretty simple given the examples that we have in the repo thus far. If you still are getting the jitters, then DM me on Twitter! I would love to work something out to help you feel better about it. I offer sponsorships for prioritized support and even private consultation if needed. Don't be shy, just reach out!


I'm sorry you've had that experience, though I don't recall seeing any issues on Github to this degree that we haven't taken care of. Can you point me to anything specific I can help you out with? Thus far, React Table v7 has been a complete joy for many to work with.

Also, remember that it's still in beta, so your frustration doesn't have to be silent or permanent! File an issue and I'll see what I can do.


The force is strong with this one!

Thanks!


I wrote React Table and have never heard of those.

So no, React Table is not a reimplementation.


If you are not operating within the React Framework, I can totally agree with this. I used Ag-Grid before I built React Table and it shines as a JS-only datagrid. Start using React however, and I don't believe that is the case.


I would actually say that if you like React-Table, you likely wouldn't want to use Ag-Grid for the very reasons that React Table exists.

Had someone asked if there were similar tables libraries, I would have expected this response and welcomed it. Ag-Grid is a great library and their free-tier is very robust, but I don't see how the above comment is anything more than a drop-in marketing attempt.


For those that want a UI along with a table, AG-Grid has a neat solution and is a viable alternative.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: