mirror of https://github.com/rancher/dashboard.git
Merge pull request #14599 from torchiaf/14594-fix-fleet-slide-in-panel
SlideInManager, close panel on component unmount
This commit is contained in:
commit
f48d2fb061
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue