Skip to content
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

[Table] Add summary feature #230

Closed
kiaking opened this issue Mar 27, 2023 · 0 comments · Fixed by #231
Closed

[Table] Add summary feature #230

kiaking opened this issue Mar 27, 2023 · 0 comments · Fixed by #231
Assignees
Labels
enhancement New feature or request

Comments

@kiaking
Copy link
Member

kiaking commented Mar 27, 2023

It would be cool add summary row in the table. Looks like this (The "Total" row).

Screenshot 2023-03-27 at 13 35 54

API

This field doesn't have to be auto calculated. Since we could get this data from the server side for example. So, at least for the start, we can create this records manually. So, maybe we could add summary field?

const table = useTable({
  orders: [...],
  columns: { ... },

  summary: {
    name: 'Total',
    type: null,
    estTotalAmount: '267,870.10',
    acqShares: 'N/A',
    acpTotalAmount: '20,500.00',
  }
})

The summary should use the settings defined on columns as same as other field. Except that by default, it will set font-weight: 600 as a style. Other than that it should work as same as normal records.

Keep in mind

The row should be appended right after the normal records so that it gets horizontal scrolling.

@kiaking kiaking added the enhancement New feature or request label Mar 27, 2023
@brc-dd brc-dd self-assigned this Mar 27, 2023
kiaking added a commit that referenced this issue Mar 28, 2023
close #230

Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants