Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Nov 23, 2024
1 parent 53e8077 commit aa59425
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/solid-table/src/createTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ export function createTable<
getInitialTableState(_features, tableOptions.initialState),
)

const statefulOptions = mergeProps(tableOptions, {
const statefulOptions: TableOptions<TFeatures, TData> = {
...tableOptions,
_features,
state: { ...store, ...tableOptions.state },
mergeOptions(defaultOptions, options) {
mergeOptions: (defaultOptions, options) => {
return mergeProps(defaultOptions, options)
},
onStateChange: (updater) => {
setStore(updater)
tableOptions.onStateChange?.(updater)
},
} as TableOptions<TFeatures, TData>) as TableOptions<TFeatures, TData>
}

const table = constructTable<TFeatures, TData>(statefulOptions)

Expand Down

0 comments on commit aa59425

Please sign in to comment.