Skip to content
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

Request for a new event for when the user is done selecting a suggestion #47

Open
nuudles opened this issue Mar 13, 2019 · 6 comments
Open

Comments

@nuudles
Copy link

nuudles commented Mar 13, 2019

Right now we have the selected event, but it gets called often as the user continues to type. I'm looking for a version where the user has actually selected a suggestion by either clicking on it in the drop down, or by hitting enter. We can get the event for enter, but right now we don't know when the user actually clicks on the suggestion. I guess basically, I want a single event for when setFinalTextValue is called with the selectedSuggest passed. Would that be valuable for other developers?

@savansavani
Copy link

Facing same issue. There is no final selected event. @selected is getting called every time key is pressed.

@albay13
Copy link

albay13 commented Jul 8, 2019

I've face the same issue as yours, So what i did is, I override the click event of the plugin such as adding .native like this (@click.native) It may not be perfect because when you clicked the input, it will also trigger your method. However, you can just add some condition inside the method in able for you to trigger it when it meets the condition. Thank you and Good luck!

@zleight1
Copy link

zleight1 commented Jul 8, 2019

The code actually has the hook for this, there's (as you mentioned) a method called: setFinalTextValue which if passes its internal validation calls: emitChange.

The body of this method is commented out, I think if it was implemented it would solve this problem.

zleight1 added a commit to zleight1/vue-instant that referenced this issue Jul 8, 2019
Emit a "change" event on when resetting, entering, or clicking a suggestion.
@albay13
Copy link

albay13 commented Jul 9, 2019

@zleight1 How is this possible? How to implement this?

@zleight1
Copy link

zleight1 commented Jul 9, 2019

@albay13 there’s a PR waiting with the feature, so we’ll have to wait for the maintainer. Or you can fork it and use the code in the PR.

@vitordesousa
Copy link

vitordesousa commented Oct 20, 2020

@santiblanko , u can look for this solution on PR's @zleight1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants