From f624d3321d3d846f87a1daed3d026664b451f205 Mon Sep 17 00:00:00 2001 From: Chika Date: Sat, 19 Sep 2020 15:37:40 +0300 Subject: [PATCH] fix table value not saving to store --- src/client/hooks/useValue.js | 3 +-- src/client/stores/CalculationStore/Data/tables.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/hooks/useValue.js b/src/client/hooks/useValue.js index 289f751..6d734b7 100644 --- a/src/client/hooks/useValue.js +++ b/src/client/hooks/useValue.js @@ -52,11 +52,10 @@ export const useTableValue = ({ tableName, rowIndex, propName }) => { useEffect(() => { calculationStore.setTableRow( { - targetName: 'values', tableName, rowIndex, }, - { [propName]: debouncedValue }, + { values: { [propName]: debouncedValue } }, ); }, [calculationStore, debouncedValue, propName, rowIndex, tableName]); diff --git a/src/client/stores/CalculationStore/Data/tables.js b/src/client/stores/CalculationStore/Data/tables.js index 41f932e..bf1f3fd 100644 --- a/src/client/stores/CalculationStore/Data/tables.js +++ b/src/client/stores/CalculationStore/Data/tables.js @@ -29,7 +29,7 @@ const tablesActions = { if (statuses && Object.keys(statuses).length > 0) { applyParams('statuses', statuses); } - if (values && Object.keys(filters).length > 0) { + if (filters && Object.keys(filters).length > 0) { applyParams('filters', filters); } },