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

Can't clear the search input and currentCatogory would not reset to 'Peoples' when closing the emoji picker #106

Open
bwliu62 opened this issue Aug 25, 2021 · 2 comments

Comments

@bwliu62
Copy link

bwliu62 commented Aug 25, 2021

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.

@bwliu62
Copy link
Author

bwliu62 commented Aug 25, 2021

any tips could implement them?

@d42ohpaz
Copy link

@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 = '';

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