fix table not updated && errors

This commit is contained in:
Chika 2020-09-15 19:19:03 +03:00
parent 15e0dc55a3
commit 51b54abd2b

View File

@ -47,10 +47,11 @@ export const withStoreValue = Component => ({
export const withTableData = Table => props => {
const { name: tableName } = props;
const ObservedTable = observer(Table);
const TableWithStore = () => {
const { calculationStore } = useStores();
const tableData = calculationStore.tables[tableName];
return <Table {...props} {...tableData} />;
return <ObservedTable {...props} {...tableData} />;
};
return TableWithStore;
};