table updates should take partial state as a parameter (Partial<TableState> instead of the current TableState) type #6003
Unanswered
piyush-kroolo
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
onStateChange
function has the type signature of(updater: Updater<TableState>) => void
as defined in the
packages/table-core/src/core/table.ts
However, when updating table state, users might need to update only certain properties of the table
something like this
In fact, the actual behavior of the table is exactly like this
However, the type signature of the
table.setState
method does not allow partial values, hence we need to addas
everywhere like thisBeta Was this translation helpful? Give feedback.
All reactions