Video wird geladen...
Video konnte nicht geladen werden
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... show more
72,233 Aufrufe • vor 3 Monaten •via X (Twitter)
28 Kommentare

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:

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

@tan_stack Where’s tanstack sheets?

@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.

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

@brasga_ @tan_stack

lfg, now i can delete a bunch of code from

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.

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

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

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

huge

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.

yay.. 🎉🎉🎉

🔥

Hope this works with tanstack virtual !

It does

Tanstack Excel when?

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

Modern, fast web based Excel 👀

I just realized this is in beta excited!

This is awesome. Looking forward to trying the first RC.

@tan_stack This is nice to have!!

Unreal - does this work with row spans and col spans? Currently using our own implementation forked off of GitHub for this and would love to just use built in.

Custom row/column spans have always been something that TanStack Table just doesn't worry about. And it still is like that in V9 right now. Maybe we'll introduce that complexity in V10.

YUI 2006 flashback (It's better than of course)

great! will it support row selection as well? like this (press `LeftArrow` key until the row is selected)

You can hook it up however you want. That's what's great about being a headless ui library. Feel free to PR any improvements to our React Aria examples

