Skip to content

refactor: TableSettings based on @tanstack/react-table integration from react-science#3994

Merged
tpoisseau merged 32 commits intomainfrom
3989-unify-table-form
Feb 26, 2026
Merged

refactor: TableSettings based on @tanstack/react-table integration from react-science#3994
tpoisseau merged 32 commits intomainfrom
3989-unify-table-form

Conversation

@tpoisseau
Copy link
Contributor

@tpoisseau tpoisseau commented Feb 18, 2026

Unify table usage with TableSettings and TableSection

Closes: #3989

@tpoisseau tpoisseau linked an issue Feb 18, 2026 that may be closed by this pull request
@tpoisseau tpoisseau changed the title feat: provide new Table with @tanstack/react-table integration feat: provide new Table with @tanstack/react-table integration Feb 18, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 18, 2026

Deploying nmrium with  Cloudflare Pages  Cloudflare Pages

Latest commit: 081fa1e
Status: ✅  Deploy successful!
Preview URL: https://d8af16c6.nmrium.pages.dev
Branch Preview URL: https://3989-unify-table-form.nmrium.pages.dev

View logs

@tpoisseau tpoisseau changed the title feat: provide new Table with @tanstack/react-table integration feat: provide new Table with @tanstack/react-table integration Feb 18, 2026
@targos

This comment was marked as resolved.

@tpoisseau

This comment was marked as resolved.

@tpoisseau tpoisseau force-pushed the 3989-unify-table-form branch 2 times, most recently from edda027 to c7bb17a Compare February 19, 2026 15:37
@tpoisseau

This comment was marked as resolved.

@tpoisseau tpoisseau force-pushed the 3989-unify-table-form branch from 65e24de to fcc4b7a Compare February 20, 2026 09:14
@tpoisseau
Copy link
Contributor Author

tpoisseau commented Feb 20, 2026

Hi, I think this PR is in a good state for a first review.
So I reused the react-science table (based on @tanstack/react-table).

  • I set some defaults props (compact, bordered and stickyHearder).
  • I implemented tdStyle column metadata with getTdProps (I will implement it directly in react-science if you agree)
  • I implemented an empty state, I don't know if it should be implemented in react-science also.
  • I added styles to obtain something similar to the nmrium react-table implementation.
  • I used the "Title block" tab to check NewTableSettings and implemented reorder by drag n drop with onRowOrderChanged (I used zod validation with codec to add/remove uuid property in my field objects)

@targos @Sebastien-Ahkrin I would have your feedbacks on the look of the table / interactions, and the API itself.
For me createTableColumnHelper<Field>() works way better than the current way to create columns with nmrium react-table.

The API of NewTableSettings is the same than react-science table:

  • data and columns mandatory
  • onRowOrderChanged and getRowId if you need to support row ordering
  • emptyContent and emptyIcon optional

I did not give a try to sort yet, but it should be possible because react-science bind getSortedRowModel: getSortedRowModel() to useReactTable.

Sebastien-Ahkrin

This comment was marked as resolved.

@targos

This comment was marked as resolved.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented tdStyle column metadata with getTdProps (I will implement it directly in react-science if you agree)

SGTM

I implemented an empty state, I don't know if it should be implemented in react-science also.

Probably makes sense to add in react-science

stropitek

This comment was marked as outdated.

@stropitek

This comment was marked as outdated.

stropitek

This comment was marked as resolved.

@tpoisseau tpoisseau force-pushed the 3989-unify-table-form branch from dc95692 to f9106d9 Compare February 25, 2026 14:04
@tpoisseau tpoisseau force-pushed the 3989-unify-table-form branch from 25c0043 to 69cdf4f Compare February 26, 2026 09:51
@tpoisseau tpoisseau changed the title feat: provide new Table with @tanstack/react-table integration refactor: TableSettings based on @tanstack/react-table integration from react-science Feb 26, 2026
@tpoisseau tpoisseau marked this pull request as ready for review February 26, 2026 11:27
@tpoisseau tpoisseau merged commit 7ae1471 into main Feb 26, 2026
14 of 15 checks passed
@tpoisseau tpoisseau deleted the 3989-unify-table-form branch February 26, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify table form

4 participants