Closed cnakh closed 1 year ago
I'm also interested to know how to use the API with Vue3 composition API and script setup
I had a similar error trying to access selectCategory.value.isOpen
boolean.
To fix that I created a mock ref type:
type MultiselectRef = InstanceType<typeof Multiselect> & {
isOpen: boolean;
}
in your case will be
type MultiselectRef = InstanceType<typeof Multiselect> & {
select: (data: object | string | whatever) => void;
}
@adamberecz Perhaps a type definition with all attributes of the ref object would fix further similar issues?
Could anyone reliably help me with TS issues to put everything in place once and for all in both Vue 2 & 3? If so, please let me know!
Could anyone reliably help me with TS issues to put everything in place once and for all in both Vue 2 & 3? If so, please let me know!
I can do it, will open a PR at some point today.
@antpngl92 Thanks for your PR! @adamberecz Can this be merged anytime soon?
Edit: I have referenced the wrong component, works now.
This PR fixes an issue I'm having with TypeScript and the open
API method. @adamberecz, what is preventing the PR from being approved and merged?
This should now be fixed in 2.6.3
. Let me know if you still encounter any issues. Thanks for the patience. 🙏
This should now be fixed in
2.6.3
. Let me know if you still encounter any issues. Thanks for the patience. 🙏
Thanks, @adamberecz!
I use with Vue 3 with TypeScript as code below
When I call
select
method it work fine in development, but when I build it get error