Closed masdh closed 1 year ago
Can't reproduce this. Feel free to reopen with a full reproducible example.
Hey, I have some kind of a related issue here I think. I use Nuxt 3 and have the following issue. I created a repository with just Nuxt and this repository. When I want to add a new Category there is an error coming up from the package.
The repository: https://github.com/shroomlife/vueform-multiselect-example
I also created a screen capture for better debugging. You can find it in the repository at screen-capture.webm
The error message:
Uncaught TypeError: Cannot read properties of undefined (reading '__CREATE__')
at handleOptionSelect (multiselect.mjs:597:16)
at Proxy.handleOptionClick (multiselect.mjs:593:5)
Do you have any tips or can see what I am doing wrong or is the issue related to the Nuxt integration?
I'm very surprised that none of the developers of this library have given an answer to this "bug" in over a year and the only answer has been that it is not reproducible and they close the issue, when the problem is the poor documentation on the "onCreate" event 😳.
I had this same problem today, apparently the "onCreate" event requires you to return the option
object.
In the example provided by @masdh the code should look like this in the createItem
function:
createItem(option, select) {
console.log("create option?", option);
console.log("create select?", select);
return option; // <-- this is the key
}
I am attempting to add new items, but it doesn't seem to be working as expected.
When I type any new word, and I choose that new word to be created the following error appears:
Am I missing something ?