autosuggest-rb
autosuggest-rb copied to clipboard
Subsequent Inputs Undefined
Firstly, I am using a preFill object, which causes this issue.
I perform a search. On form submission, I wish for the autosuggest field to remain populated with what the user searched for, so I create a preFill object:
[{:name => search_term, :id => search_term_object_id}]
I've set these options:
"selectedItemProp" => :name, "selectedValuesProp" => :id
Now if I would like to change the search, I hit the x to remove the old search term, and input a new one. The new one populates the as-values hidden input with undefined for the new term id.