Skip to content

Conversation

@lmammino
Copy link

@lmammino lmammino commented Sep 7, 2012

Allows to return a string on the onSelect method that filters out the value that will be set on the input field.

E.g.

$('._autocomplete').autocomplete({ onSelect : function(value, data, input) { return 'Filtered value: ' + data.value; } }); 

If selecting New York will set the input text value as Filtered value: New York

@tkirda
Copy link
Member

tkirda commented Dec 19, 2012

Updated onSelect callback in version 1.2, where this binds to input field so you can update the value by doing:

this.value = 'Any value'; 
@tkirda tkirda closed this Dec 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants