Skip to content

Commit

Permalink
Fix group detail collapse on save and stay action
Browse files Browse the repository at this point in the history
  • Loading branch information
SP12893678 committed Jul 24, 2024
1 parent 156bfcb commit 2786d2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/interfaces/group-detail/group-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ defineEmits(['apply']);
const { t } = useI18n();
const detailOpen = ref(props.start === 'open');
const isFirstLoading = ref(true);
// In case that conditions change the start prop after the group already got rendered
// caused by the async loading of data to run the conditions against
watch(
() => props.loading,
(newVal) => {
if (!newVal) detailOpen.value = props.start === 'open';
if (!newVal && isFirstLoading.value) {
if(isFirstLoading.value) isFirstLoading.value = false;
detailOpen.value = props.start === 'open';
}
},
);
Expand Down

0 comments on commit 2786d2e

Please sign in to comment.