vue-select icon indicating copy to clipboard operation
vue-select copied to clipboard

Send an event when there are no options

Open PieterWigboldus opened this issue 7 years ago • 4 comments

I would like to receive an event when there are no options, so i can do something when there are no results.

PieterWigboldus avatar Apr 04 '19 13:04 PieterWigboldus

Great idea.

When should this event fire? As a watcher on filteredOptions? Can you describe your use case?

sagalbot avatar Apr 04 '19 15:04 sagalbot

My use case is that we would collect search keywords with no results, so we can see where people are searching for. I have now a fix that if the Ajax call has no results, I also can collect that information.

w3nl avatar Apr 04 '19 17:04 w3nl

I have this need as well. An event handler for filteredOptions.length == 0 would work.

However, we don't do anything until they select a button that says "Analyze," so ideally an event handler for when the filteredOptions.length > 0 again would be great so I can programmatically change it from "Analyze" to "Suggest this option" and back dynamically.

reptile18 avatar May 18 '20 18:05 reptile18

Hey @sagalbot , can I implement this?

mahdikmg avatar Apr 19 '23 20:04 mahdikmg