From cc079336a8322f310de50e79337537024d01289b Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 11 Jul 2022 17:06:18 +0200 Subject: [PATCH] fix: expose focus function for BaseButton This fixes an issue with the usage of BaseButton in multiselect. --- src/components/base/BaseButton.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/base/BaseButton.vue b/src/components/base/BaseButton.vue index f2f9e51d..c617c30e 100644 --- a/src/components/base/BaseButton.vue +++ b/src/components/base/BaseButton.vue @@ -5,6 +5,7 @@ :class="{ 'base-button--type-button': isButton }" v-bind="elementBindings" :disabled="disabled || undefined" + ref="button" > @@ -89,6 +90,15 @@ watchEffect(() => { }) const isButton = computed(() => componentNodeName.value === 'button') + +const button = ref() +function focus() { + button.value.focus() +} + +defineExpose({ + focus, +})