ui icon indicating copy to clipboard operation
ui copied to clipboard

feat(Table): Add Table component

Open multiwebinc opened this issue 2 years ago • 8 comments

multiwebinc avatar Apr 25 '23 22:04 multiwebinc

@multiwebinc is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 25 '23 22:04 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2023 11:47am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-template ⬜️ Ignored (Inspect) Visit Preview May 8, 2023 11:47am

vercel[bot] avatar Apr 25 '23 23:04 vercel[bot]

This looks great. I've been testing tanstack-table integration. I'll give this a try with this component and report back.

shadcn avatar Apr 26 '23 07:04 shadcn

Since tanstack-table might be overkill for simple tables, you might want to consider adding it as a separate component, sort of like how MUI has Table for simple tables and DataGrid for more advanced uses.

This component looks OK, but it would be nice if there were more colors to choose from. There are a couple of issues open about that, so if you let me know what direction you want to head, I would be willing to work on a PR for that as well if you like.

multiwebinc avatar Apr 26 '23 16:04 multiwebinc

This looks great. I've been testing tanstack-table integration. I'll give this a try with this component and report back.

Hey, if you want I can give tanstack table a look and make a PR

Rugz007 avatar Apr 26 '23 20:04 Rugz007

I vote for using tanstack-table and have a basic example that people can build upon.

willopez avatar Apr 27 '23 14:04 willopez

@multiwebinc Since tanstack-table might be overkill for simple tables, you might want to consider adding it as a separate component, sort of like how MUI has Table for simple tables and DataGrid for more advanced uses.

I vote to support this, have a simple Table, then differentiate the name (Table vs DataGrid vs other) to fulfill both or more community expectations down the road.

Edit: Whoa and what just shipped recently also the Data Table with TanStack Table

https://ui.shadcn.com/examples/tasks https://ui.shadcn.com/docs/components/data-table

mhaidarhanif avatar Apr 27 '23 16:04 mhaidarhanif

Thanks for the suggestions.

As @multiwebinc said, making tanstack-table the default would be overkill for most app.

I suggest we move forward with @multiwebinc <Table /> primitive and add tanstack-table as an example.

shadcn avatar Apr 29 '23 14:04 shadcn

@multiwebinc I'm going ahead and merge this. I have some more updates in another branch incoming. Thank you.

shadcn avatar May 08 '23 11:05 shadcn

@multiwebinc I pushed table and data table yesterday. Couldn't find you on Twitter to credit you for starting the work on table. But I merged this PR so you should get the commit credit.

HMU on Twitter if you're around.

shadcn avatar May 10 '23 12:05 shadcn