Skip to content

Commit

Permalink
Activate right tab when deleting tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jan 16, 2025
1 parent 3dfd383 commit 4074a84
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rdmo/projects/assets/js/interview/actions/interviewActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,11 @@ export function deleteSet(set, setValue) {

if (sets.length > 1) {
const index = sets.indexOf(set)
if (index > 0) {
if (index < sets.length - 1) {
dispatch(activateSet(sets[index + 1]))
} else {
// If it's the last set, activate the new last set
dispatch(activateSet(sets[index - 1]))
} else if (index == 0) {
dispatch(activateSet(sets[1]))
}
}

Expand Down

0 comments on commit 4074a84

Please sign in to comment.