Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

focus() issue #398

Open
WhatArmy2 opened this issue Mar 6, 2024 · 1 comment
Open

focus() issue #398

WhatArmy2 opened this issue Mar 6, 2024 · 1 comment

Comments

@WhatArmy2
Copy link

How to programically focus() multiselect field?
I am using vue3 and the solution given in the readme does not work.
Thank you

@aelnonym
Copy link

aelnonym commented Mar 22, 2024

@WhatArmy2 That way worked for me:

<script setup>
// ...
const input = ref();

const focusOnInput = () => {
  input.value.$refs.input.focus();
}
</script>

<template>
  <Multiselect
    ref="input"
    //...
  />

</template>

Btw, this kind of question is usually answered faster on their Discord channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants