-
Notifications
You must be signed in to change notification settings - Fork 152
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
Append new option in single mode #150
Comments
Here is my workaround for now: <Multiselect
v-model="value"
:searchable="true"
:createTag="true"
:options="options"
@select="select"
/> const appConf = {
data: () => ({
value: null,
options: [
{ value: 'batman', label: 'Batman' },
{ value: 'robin', label: 'Robin' },
{ value: 'joker', label: 'Joker' },
],
}),
methods: {
select(optionLabel) {
if (this.options.find(option => option.label === optionLabel)) return;
this.options.push({ id: optionLabel, label: optionLabel });
}
}
}
|
Gotta ask is this related to this? #152 |
Seems not related, I'm talking about the |
Quite funny mine was also trying to implement single mode, forgot to mention/implement it also but it fixed my problem. If multiselect is inside the |
I haven't thought that this would be useful for non-tag inputs. Apparently it is so I've added support for it in
Old options & event will still work but new versions are encouraged from now on. Please report if you encounter any issues as this was a quite big change and even though everything seems to pass I not sure if I managed to think through all real life cases. Closing this for now. |
I was expecting to be able add new options in single mode but it doesn't seem to do it
Here if I type "Moonnight" then [Enter] I can see
value
is now{ value: 'Moonnight', label: 'Moonnight }
but not getting added onoptions
.Am I missing something ?
The text was updated successfully, but these errors were encountered: