Navigation überspringen
Based on lots of beta feedback, the most requested missing feature of TanStack Table has been Cell…
0:00 / 0:23

Based on lots of beta feedback, the most requested missing feature of TanStack Table has been Cell…

Kevin Thomas Van Cott

@KevinVanCott3326 Follower

Auf X besuchen

72.274 Aufrufe

Based on lots of beta feedback, the most requested missing feature of TanStack Table has been Cell Selection and Keyboard Navigation. And now, an official cellSelectionFeature has been added to V9! I originally started out thinking that we could just build an official example, showing you how to implement this stuff yourself, but then after I built it, I thought that it should at least be an official plugin. And then after just a couple hours more of refinement, I just ended up adding it as a stock feature. 😂 There are a couple reasons why this is now a new built-in stock feature: 1. In V9, all features are opt-in, so this doesn't bloat the js bundle for anyone not using it. 2. The keyboard navigation part of this feature is actually not a part of this TanStack Table feature... because that gets handled by TanStack Hotkeys! More on that down below 👇

28 Kommentare

Kommentare aus dem Originalbeitrag auf X (Twitter)

  • Profilbild von Kevin Thomas Van Cott

    @KevinVanCott

    On the TanStack Table side, this feature only handles the state management and APIs of the cell selection. Then you can set up any custom keyboard shortcuts or external actions otherwise to interact with the table APIs. There's a lot of advanced complexity with keyboard shortcuts that I never wanted to have to deal with within the TanStack Table core codebase, so thankfully, with nice composable patterns like this, Table can hand that complexity off to TanStack Hotkeys or your own custom solution of choice! Try out the full example here:

    49 Likes

  • Profilbild von Kevin Thomas Van Cott

    @KevinVanCott

    Apparently, you can get halfway to building excel with this...

    14 Likes

  • Profilbild von Braga

    @brasga_

    @tan_stack Where’s tanstack sheets?

    16 Likes

  • Profilbild von Kevin Thomas Van Cott

    @KevinVanCott

    @tan_stack I guess we could make an "Excel sheet" example using TanStack Table. There's already lots of excel spreadsheet libraries out there if you are truly wanting to duplicate full sheet behavior.

    8 Likes

  • Profilbild von Avinash

    @Avinash7986

    @brasga_ @tan_stack Please add example, it will be really helpful

    2 Likes

  • Profilbild von Kevin Thomas Van Cott

    @KevinVanCott

    @brasga_ @tan_stack

    2 Likes

  • Profilbild von sadman

    @sadmann17

    lfg, now i can delete a bunch of code from

    10 Likes

  • Profilbild von JakubH

    @ijakubh

    Neat! One of the features I was missing in TanStack Table was an API for defining row spans and related - such as adding hover function that highlights the relevant cells in a row.

    9 Likes

  • Profilbild von Kevin Thomas Van Cott

    @KevinVanCott

    That's one feature that I really haven't wanted to implement, because the row models would potentially have to account for a lot more scenarios. Proposals on how to do this correctly would be welcome, though I don't know if it would get into V9

    9 Likes

  • Profilbild von JakubH

    @ijakubh

    Yeah, from our implementation, it’s tough one to solve generally.

  • Profilbild von Jessie Liauw A Fong

    @Jessie_laf

    @tan_stack Really cool to see the amount of work you guys have put into it the last couple of weeks / months.

    5 Likes

  • Profilbild von phatg

    @phatggg

    huge

    2 Likes

  • Profilbild von Portgas D Adhikari

    @shreyam1008

    This is beautiful. You can't believe the people familiarity with excel (sheets) like workload. So many of rhe request on tables for me in our org was to add basic sheet features. And rhe level of messy code we had to write for it.Gosh!! Thanks for this.

    1 Like

  • Profilbild von Akshara Hegde - oss/acc

    @akshara_dev

    yay.. 🎉🎉🎉

    1 Like

  • Profilbild von aFuzzyBear 🇺🇦

    @aFuzzyBear2

    🔥

    1 Like

  • Profilbild von Grégory Hoarau

    @GregHoarau

    Hope this works with tanstack virtual !

    1 Like

  • Profilbild von Kevin Thomas Van Cott

    @KevinVanCott

    It does

    1 Like

  • Profilbild von aspizu

    @aspizu_

    Tanstack Excel when?

  • Profilbild von AI Mastery Guide

    @aiseomastery

    Turning it into an official opt-in feature instead of bloating everyone's bundle is the right call 👍

  • Profilbild von Filip

    @aladicf

    Modern, fast web based Excel 👀