ui icon indicating copy to clipboard operation
ui copied to clipboard

[Table] Implement component

Open benjamincanac opened this issue 1 year ago • 3 comments

benjamincanac avatar Mar 20 '24 14:03 benjamincanac

It is recommended to provide Table and DataTable separately, with the Table component only wrapping basic style variants, while other advanced features are provided in DataTable. DataTable can reuse the style variants of the Table.

I believe that Table can be prioritized for development at this stage. As for whether to use Tanstack Table or others, that can be considered when developing the DataTable, and the DataTable can inherit the style variants of the Table, which will not lead to redundant work.

refs: [Vuetify] https://vuetifyjs.com/en/components/tables/#usage https://vuetifyjs.com/en/components/data-tables/introduction/#components

[Shadcn] https://www.shadcn-vue.com/docs/components/table.html https://www.shadcn-vue.com/docs/components/data-table.html

robin-dongbin avatar Oct 03 '24 03:10 robin-dongbin

This logic works for shadcn because they provide a primitive for each HTML element of the table. However, in Nuxt UI you will still have to pass a columns and items / rows props to the Table component which will render the table. It doesn't make sense to make two components for us.

benjamincanac avatar Oct 03 '24 14:10 benjamincanac

I will explain my reasons for your reference: First of all, I hope to have a fully controllable table content rendering method while maintaining a unified UI style. Secondly, with the increase of functional requirements, Datatable will have a lot of internal complexity, which sometimes only It is too heavy to render an ordinary table. After clarifying, I want to say that developing a separate table component will not increase much workload, because its style can be completely inherited by Datatable, and because the table component contains almost no functions, there is almost no need for maintenance in the later stage. If you think table is completely unnecessary, or for compatibility with v2, I completely understand what you are saying, just clarifying my idea 🤔

robin-dongbin avatar Oct 03 '24 16:10 robin-dongbin

Feature request for table. I think it would be great to also have error state just like loading or empty state.

UfukUstali avatar Oct 04 '24 12:10 UfukUstali