-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
option:deselected and option:deselecting are not getting emitted #1430
Comments
I have encountered the same 'problem' when using single selections. However using a multiple selection emits the two deselection events (version 3.11.2 & 3.11.1). Is that intended, that emitting the deselection events only works with multiple selections? (see line 21 in the code) @closingin for my usecase with the single selection it is sufficient to take the emit value of |
@allanbenelli Yeah I made the same change as a workaround, but I felt like it was worth opening the issue, thanks for confirming the bug though! |
After a small investigation, the problems comes from the fact that clicking on the "clear selection" button doesn't call the same method ( I would say that technically it's not a bug, as "clearing selection" is not the same as "deselecting something". But if we have This would mean adding two |
Same issue here, at least |
How could you explain? I am not able to handle callback of @input on single selects. I am using Vue-Select 4.0.0-beta.2 |
Yeah, I got the same problem.. Implementing |
I'm running into a new issue. How can I fix this without overwriting the base code of the package? I tried doing: but neither are firing off the event to the parent when clicking the "X" button or Deselect button |
Having the same issue. I am using a select via ajax, meaning when editing a form I only have one option in my list, and then deselect does not work. |
I'm also experiencing this issue. I cannot listen to |
Any idea about this issue? Only |
Using |
I had to drill trough the back of the head, but it works (very ugly workaround i guess): const abc = ref()
$(abc.value.$refs.clearButton).click((e) => {
selectedOption(null)
}) <v-select ref="abc"
@search="findData"
@update:modelValue="selected"
v-model="selected"
@option:selected="selectedOption"
label="name"
:filterable="false"
:options="options"
></v-select> |
WORKS, THANKS |
:deselectFromDropdown="true" property worked for me |
Update vue-select to the latest version and set :deselectFromDropdown="true" to enable deselection from the dropdown. |
Describe the bug
Hello there! I've installed the latest version of vue-select (3.11.2, but also tried 3.11.1), and it seems like the two deselection events do not get emitted.
To Reproduce
Expected behavior
option:deselected
should get fired. As you can see in my screenshot, the twoselecting
andselected
events do get fired, but not deselection ones (corresponding to the lastinput
event you see). I've also tried withoption:deselecting
, and it also doesn't work.Screenshots
The text was updated successfully, but these errors were encountered: