本页还没有译文
本页 20 段还没译成Português (BR),下面显示的是英文原文。table_syncExternalStateToBaseAtoms
还没翻译译自英文(tanstack.com)本页 20 段都还没译
function table_syncExternalStateToBaseAtoms<TFeatures, TData>(
table,
capturedState?,
compare?): void;Defined in: core/table/coreTablesFeature.utils.ts:28
Synchronizes externally controlled state slices into the table's base atoms.
This keeps options.state values mirrored in the atom graph so derived
atoms, stores, and table APIs read a consistent snapshot.
Adapters that update options during their host's render phase pass the
state snapshot captured by the committed render as capturedState — the
shared options object may already hold values from a newer render that
never commits. Pass null to publish nothing (a captured "no controlled
state"); omitting the argument reads the current table.options.state
instead. An optional compare suppresses semantically unchanged slice
writes; the default remains reference equality.
Type Parameters
TFeatures
TFeatures extends TableFeatures
TData
TData extends RowData
Parameters
table
Table_Internal<TFeatures, TData>
capturedState?
| Partial<TableState<TFeatures>>
| null
compare?
(currentState, externalState) => boolean
Returns
void
Example
table_syncExternalStateToBaseAtoms(table)
table_syncExternalStateToBaseAtoms(table, capturedState ?? null, shallow)