From aa59425fcca0b427f345af4a211bf026929cdde5 Mon Sep 17 00:00:00 2001 From: riccardoperra Date: Sat, 23 Nov 2024 11:41:50 +0100 Subject: [PATCH] fix --- packages/solid-table/src/createTable.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/solid-table/src/createTable.ts b/packages/solid-table/src/createTable.ts index b4b1d3e0be..d6084a39b5 100644 --- a/packages/solid-table/src/createTable.ts +++ b/packages/solid-table/src/createTable.ts @@ -23,17 +23,18 @@ export function createTable< getInitialTableState(_features, tableOptions.initialState), ) - const statefulOptions = mergeProps(tableOptions, { + const statefulOptions: TableOptions = { + ...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) as TableOptions + } const table = constructTable(statefulOptions)