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

Add function clear #256

Closed
JordyMiljaar opened this Issue Nov 11, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@JordyMiljaar

JordyMiljaar commented Nov 11, 2016

First of all, you have build the best typeahead! ;)

I think that it should be a good idea to add a clear function. Sorry if this already exists but I couldn't find it.

Typeahead.prototype.clear = function() {
this.node.val('');
this.item = null;
this.query = '';
this.rawQuery = '';
}

running-coder added a commit that referenced this issue Nov 18, 2016

@running-coder

This comment has been minimized.

Owner

running-coder commented Nov 18, 2016

Hey @JordyMiljaar thanks for the kind words!

Typeahead has something similar called resetLayout which handles more of the dropdown list of result. I'll add resetInput that suits your description.

@running-coder running-coder added this to the 2.7.3 milestone Nov 18, 2016

running-coder added a commit that referenced this issue Nov 30, 2016

Version 2.7.3
- #251 Javascript error when using `correlativeTemplate` and a template function
- #256 Add clear function `resetInput` for Typeahead input
- #257 Allow to cancel the Ajax request before it's sent
- #261 Module export function call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment