Closed benjamincanac closed 1 month ago
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.
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 🤔
Feature request for table. I think it would be great to also have error state just like loading or empty state.
It is recommended to provide
Table
andDataTable
separately, with theTable
component only wrapping basic style variants, while other advanced features are provided inDataTable
.DataTable
can reuse the style variants of theTable
.I believe that
Table
can be prioritized for development at this stage. As for whether to useTanstack Table
or others, that can be considered when developing theDataTable
, and theDataTable
can inherit the style variants of theTable
, 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