diff --git a/package.json b/package.json index 2d05ad7..ce7b4b5 100644 --- a/package.json +++ b/package.json @@ -3,33 +3,33 @@ "private": true, "dependencies": { "@ant-design/icons": "^4.5.0", - "@apollo/client": "^3.3.9", + "@apollo/client": "^3.3.13", "@babel/code-frame": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", "@craco/craco": "^6.1.1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", - "antd": "^4.12.3", + "antd": "^4.15.0", "axios": "^0.21.1", "craco-less": "^1.17.1", "graphql": "^15.5.0", "js-cookie": "^2.2.1", - "lodash": "^4.17.20", - "luxon": "^1.25.0", - "mobx": "^6.1.6", + "lodash": "^4.17.21", + "luxon": "^1.26.0", + "mobx": "^6.1.8", "mobx-react-lite": "^3.2.0", "normalize.css": "^8.0.1", "pluralize": "^8.0.0", - "react": "^17.0.1", - "react-dom": "^17.0.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", - "react-scripts": "^4.0.1", - "styled-components": "^5.2.1", + "react-scripts": "^4.0.3", + "styled-components": "^5.2.3", "styled-system": "^5.1.5", "typescript": "4.1.5", - "use-debounce": "^5.2.0", + "use-debounce": "^6.0.1", "uuid": "^8.3.2", "validator": "^13.5.2" }, diff --git a/src/client/hooks/Calculation/useValue.js b/src/client/hooks/Calculation/useValue.js index 05e2f51..cdcdad3 100644 --- a/src/client/hooks/Calculation/useValue.js +++ b/src/client/hooks/Calculation/useValue.js @@ -29,7 +29,7 @@ export const useStoreValue = ({ valueName }) => { DEFAULT_DEBOUNCE_DELAY, ); useEffect(() => { - debounced.callback(valueName, currentValue); + debounced(valueName, currentValue); }, [currentValue]); return { value: currentValue, setCurrentValue }; @@ -58,7 +58,7 @@ export const useTableValue = ({ tableName, rowIndex, propName }) => { //set row value to store useEffect(() => { if (currentValue !== undefined) - debouncedSetTableRow.callback(tableName, rowIndex, { + debouncedSetTableRow(tableName, rowIndex, { [propName]: { value: currentValue, }, @@ -91,7 +91,7 @@ export const useTableValue = ({ tableName, rowIndex, propName }) => { useEffect(() => { if (cellCallBack && calculationProcess.process === Process.Default) - debouncedCellCallback.callback( + debouncedCellCallback( cellCallBack, calculationStore, calculationProcess,