Skip to content

Commit

Permalink
Add dataset tab changing to edit history (#1995)
Browse files Browse the repository at this point in the history
  • Loading branch information
korvin89 authored Jan 10, 2025
1 parent 0d81c1e commit 516e4d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/ui/units/datasets/store/actions/creators/datasetTyped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,17 @@ export function addEditHistoryPointDs({stacked}: EditHistoryOptions = {}) {
};
}

export function setCurrentTab(payload: SetCurrentTab['payload']): SetCurrentTab {
export function setCurrentTab({
currentTab,
[EDIT_HISTORY_OPTIONS_KEY]: editHistoryOptions,
}: SetCurrentTab['payload']): SetCurrentTab {
return {
type: DATASET_ACTION_TYPES.SET_CURRENT_TAB,
payload,
payload: {
currentTab,
[EDIT_HISTORY_OPTIONS_KEY]: {
...editHistoryOptions,
},
},
};
}
2 changes: 1 addition & 1 deletion src/ui/units/datasets/store/types/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ export type SetCurrentTab = {
type: typeof SET_CURRENT_TAB;
payload: {
currentTab: DatasetTab;
};
} & EditHistoryOptionsProperty;
};

export type DatasetReduxAction =
Expand Down

0 comments on commit 516e4d2

Please sign in to comment.