-
Notifications
You must be signed in to change notification settings - Fork 741
Add Footer Feature to Table Component #1025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would also like to note that the inability to set a caption is another point of concern. |
I think you can add your own data summary with your own fields, position (above or bellow table), or style quite easily. Do you have any special requirements? Could you provide an example (url, image,...) for reference? |
Thank you for your response and for considering my feature request. I appreciate the flexibility and customization options you mentioned. To clarify my requirements for the footer feature in the Table component, here they are in more detail:
I believe these features would greatly enhance the functionality and usability of the Table component in Nuxt UI. If you have any suggestions or require further clarification on these points, I am open to discussion. Additionally, I am attaching two images to illustrate the footer's behavior in my proposed implementation. The first image shows the table without sorting, and the second one during sorting. In both cases, the footer remains at the fixed position at the bottom, unaffected by sorting. Please note that the style of the images is tailored to my product, so the visual appearance might differ from the standard Nuxt UI styling. The key point to observe here is the consistent placement of the footer regardless of sorting. |
Following up on my earlier points, I'd like to provide an example of the envisioned code structure to further clarify my proposal for the footer feature. This code snippet is a rough idea of how I imagine the footer data and its integration with the Table component: <UTable
:rows="[{id: 1, name: 'foo', value: 1, noview: 1}, {id: 2, name: 'bar', value: 4, noview: 1}, {id: 3, name: 'biz', value: 2, noview: 2}]"
:columns="[{key: 'id', label: 'ID', sortable: true}, {key: 'name', label: 'Name'}, {key: 'value', label: 'Value', sortable: true}]"
:foots="[{id: -1, name: 'total', value: 7, noview: 4}]"
>
<template #id-data="{ row, isFoot }">
<div> {{ !isFoot ? row.id : '-' }} </div>
</template>
</Utable> This code example demonstrates how the I'm open to suggestions and further discussions on this approach. |
I think a footer would be crucial for the table component. It is not possible to make it just another row because the footer does have different columns, e.g. the footer just has one column that sums the values. A footer can also consist of multiple rows, e.g. think about an invoice that has one footer row sum (net), one row VAT and one row sum (gross) |
Might this be something for v3 that uses TanStack Table @benjamincanac ? |
In #4194 added support for |
Description
Background
The current Table component in Nuxt UI allows for the listing of data but lacks a dedicated area for displaying supplementary information such as summary results. This limitation hinders the ability to present crucial data insights and reports.
Feature Proposal
I propose the addition of a Footer area to the Table component. This Footer should be adjustable based on the columns specification, similar to how rows are handled. It would serve as a space for displaying aggregate results, subtotals, and other important notes related to the data.
Expected Impact
With this feature, the Nuxt UI Table component will become more versatile, offering a more comprehensive set of options for data presentation. Users will be able to glean a more comprehensive understanding of their data by viewing aggregate results and other key information directly within the table.
Additional Considerations
Implementing the Footer must carefully balance design and functionality, as it could impact the existing structure of the Table component. Ensuring compatibility with existing features and maintaining extensibility is also crucial.
Additional context
I am not a native English speaker, so this message was generated with the assistance of ChatGPT.
The text was updated successfully, but these errors were encountered: