From 0c142410142e31720dbdd506b0d7e6f0edaf5510 Mon Sep 17 00:00:00 2001 From: Catalin <20538711+devcatalin@users.noreply.github.com> Date: Thu, 18 Nov 2021 14:07:32 +0200 Subject: [PATCH] fix: select values file path on preview --- src/redux/reducers/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/redux/reducers/main.ts b/src/redux/reducers/main.ts index 040404c7e3..17ca95877b 100644 --- a/src/redux/reducers/main.ts +++ b/src/redux/reducers/main.ts @@ -495,7 +495,9 @@ export const mainSlice = createSlice({ state.currentSelectionHistoryIndex = undefined; resetSelectionHistory(state); state.selectedResourceId = undefined; - state.selectedPath = undefined; + if (action.payload.previewResourceId && state.helmValuesMap[action.payload.previewResourceId]) { + selectFilePath(state.helmValuesMap[action.payload.previewResourceId].filePath, state); + } state.selectedValuesFileId = action.payload.previewResourceId; }) .addCase(previewHelmValuesFile.rejected, (state, action) => {