-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move continuous fields to the dataset drawer if there is a sing…
…le value for all cells (#918) Co-authored-by: atarashansky <[email protected]>
- Loading branch information
1 parent
1de020b
commit 055b24d
Showing
6 changed files
with
108 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Action, AnyAction } from "redux"; | ||
|
||
export interface SingleContinuousValueState { | ||
singleContinuousValues: Map<string, string>; | ||
} | ||
|
||
const initialState = { | ||
singleContinuousValues: new Map(), | ||
}; | ||
|
||
export interface SingleContinuousValueAction extends Action<string> { | ||
field: string; | ||
value: string; | ||
} | ||
|
||
const singleContinuousValue = ( | ||
state = initialState, | ||
action: AnyAction | ||
): SingleContinuousValueState => { | ||
switch (action.type) { | ||
case "add single continuous value": | ||
|
||
state.singleContinuousValues.set(action.field, action.value); | ||
return state; | ||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
export default singleContinuousValue; |