From 114d86cfb3abe4ce0110b5d24dac8ff7d6d27c71 Mon Sep 17 00:00:00 2001 From: Don Walizer <12420708+dwalizer@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:38:43 -0400 Subject: [PATCH] #2632 Add return focus to icon picker --- .../src/components/utils/iconPicker/IconPicker.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashboard-prime/src/components/utils/iconPicker/IconPicker.vue b/dashboard-prime/src/components/utils/iconPicker/IconPicker.vue index a59109b455..91b124c7d8 100644 --- a/dashboard-prime/src/components/utils/iconPicker/IconPicker.vue +++ b/dashboard-prime/src/components/utils/iconPicker/IconPicker.vue @@ -17,7 +17,9 @@ limitations under the License. import { ref } from 'vue' import IconManager from '@/components/utils/iconPicker/IconManager.vue' import OverlayPanel from 'primevue/overlaypanel' +import { useFocusState } from '@/stores/UseFocusState.js' +const focusState = useFocusState() const emit = defineEmits(['selected-icon']) const props = defineProps({ @@ -38,13 +40,13 @@ const props = defineProps({ const iconManagerOverlayPanel = ref() - const toggleIconDisplay = (event) => { iconManagerOverlayPanel.value.toggle(event) } const onSelectedIcon = (selectedIcon) => { iconManagerOverlayPanel.value.hide() + focusState.focusOnLastElement() emit('selected-icon', selectedIcon) } @@ -54,6 +56,7 @@ const onSelectedIcon = (selectedIcon) => {