delowardev / vue3-emoji-picker

Simple and Powerful Emoji Picker for Vue3
https://codesandbox.io/p/github/delowardev/vue3-emoji-picker/main?file=%2FREADME.md
MIT License
171 stars 34 forks source link

Unable to reset input value upon using v-model or ref #65

Open richiemodefair opened 7 months ago

richiemodefair commented 7 months ago

this is the component in template

<button @click="clearInput">Clear

and inside the script

import EmojiPicker from "vue3-emoji-picker"; import "vue3-emoji-picker/css";

const clearInput = async () => { console.log(textInput); textInput.value = '' }

result upon entering "hi" and clicking the "Clear" button

Screenshot 2023-12-19 at 5 58 24 PM

for the use of ref, it yields the same outcome

hi5on9 commented 5 months ago

i have same problem did you resolve it ?

WanyoikeJ commented 4 months ago

i have the same issue, i want to reset the input after sending the message, At the moment am using this document.querySelector('.v3-emoji-picker-input').value = null; which works partially because if i pick emoji immediately after sending the message, it populates the input with the just sent message