Skip to content

Commit

Permalink
Formula refactoring (#12)
Browse files Browse the repository at this point in the history
* refactoring

* move main column generation into parse module

* fix tests
  • Loading branch information
flash1293 authored May 10, 2021
1 parent b2272f9 commit b4a36ad
Show file tree
Hide file tree
Showing 16 changed files with 1,099 additions and 1,047 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export function LayerPanels(
() => (datasourceId: string, newState: unknown) => {
dispatch({
type: 'UPDATE_DATASOURCE_STATE',
updater: () => newState,
updater: (prevState: unknown) =>
typeof newState === 'function' ? newState(prevState) : newState,
datasourceId,
clearStagedPreview: false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
};

const setIsCloseable = (isCloseable: boolean) => {
setState({ ...state, isDimensionClosePrevented: !isCloseable });
setState((prevState) => ({ ...prevState, isDimensionClosePrevented: !isCloseable }));
};

const selectedOperationDefinition =
Expand Down
Loading

0 comments on commit b4a36ad

Please sign in to comment.