Merge pull request #14599 from torchiaf/14594-fix-fleet-slide-in-panel

SlideInManager, close panel on component unmount
This commit is contained in:
Francesco Torchia 2025-06-27 08:10:14 +02:00 committed by GitHub
commit f48d2fb061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, watch } from 'vue';
import { computed, onBeforeUnmount, watch } from 'vue';
import { useStore } from 'vuex';
import {
DEFAULT_FOCUS_TRAP_OPTS,
@ -90,6 +90,8 @@ watch(
{ deep: true }
);
onBeforeUnmount(closePanel);
function closePanel() {
store.commit('slideInPanel/close');
}