fix: expose focus function for BaseButton
continuous-integration/drone/push Build is passing Details

This fixes an issue with the usage of BaseButton in multiselect.
This commit is contained in:
kolaente 2022-07-11 17:06:18 +02:00
parent ab7bf7d8f9
commit cc079336a8
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@
:class="{ 'base-button--type-button': isButton }"
v-bind="elementBindings"
:disabled="disabled || undefined"
ref="button"
>
<slot />
</component>
@ -89,6 +90,15 @@ watchEffect(() => {
})
const isButton = computed(() => componentNodeName.value === 'button')
const button = ref()
function focus() {
button.value.focus()
}
defineExpose({
focus,
})
</script>
<style lang="scss">