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

Clearing of input field when adding items with javascript callback #19

Open
villejj opened this issue Apr 10, 2012 · 0 comments
Open

Clearing of input field when adding items with javascript callback #19

villejj opened this issue Apr 10, 2012 · 0 comments

Comments

@villejj
Copy link

villejj commented Apr 10, 2012

It would be nice if the component would clear the input field when adding items with the javascript callback.

My current workaround is to "manually" clear the input after calling the "add" method.

var autoSuggest = $(autosuggestFieldId);
options.start = function(callbacks){
addItem = callbacks.add;
};
autoSuggest.autoSuggest(..., options);
...
addItem(item);
autoSuggest.val('');

Btw, using the callbacks for adding items might be something to be added to documentation, took a while to figure out how it works.

jerefrer referenced this issue in jerefrer/jquery-autosuggest Aug 5, 2013
Allows selection by hitting ENTER if neverSubmit is true
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

1 participant