V-Emoji-Picker
V-Emoji-Picker copied to clipboard
Can't clear the search input and currentCatogory would not reset to 'Peoples' when closing the emoji picker
Hi, I am a student and learning to use your wonderful package. I tried my best to figure out how to implement the above two features, but can't succeed. Is it possible to add these functions to your package? really appreciate!
I tried to in 'data' add currentCategory: "Peoples" and filterEmoji: "", but it doesn't work.
any tips could implement them?
@bwliu62 A bit of a long way around to get the job done, but should work until something better comes along.
const picker = this.$refs.picker as VEmojiPicker;
const cateories = picker.$children.find((component: Vue) => component.$el.id === 'Categories') as Categories;
const input = picker.$children.find((component: Vue) => component.$el.id === 'InputSearch') as InputSearch;
const peoplesCategory = cateories.$children.find((component: Vue) => {
const propsData = component.$options.propsData as {label: string};
return propsData?.label === 'Peoples';
}) as Vue;
const peoplesSvg = peoplesCategory.$el as HTMLElement;
peoplesSvg.click();
input.inputSearch = '';