maxschuster / Vaadin-AutocompleteTextField

A Vaadin TextField with autocomplete (aka word completion) functionality
https://vaadin.maxschuster.eu/AutocompleteTextField/
Apache License 2.0
9 stars 6 forks source link

getValue() on the field is not returning the selected value #16

Closed Prady220 closed 7 years ago

Prady220 commented 7 years ago

getValue() on the autocomplete text field is returning the value typed in for search instead of the selected value. This issue can be seen in all the browsers except in Firefox and Chrome.

maxschuster commented 7 years ago

Thank you for reporting this issue.

I'll investigate it.

maxschuster commented 7 years ago

I have updated the online demo with a fix: https://vaadin.maxschuster.eu/AutocompleteTextField/

pradeep220 commented 7 years ago

Thank you for providing a fix in short notice

Prady220 commented 7 years ago

I found an issue with the fix which I explained in detail at https://github.com/maxschuster/Vaadin-AutocompleteTextField/commit/29d145f6a9cf29f903eace3a61a82cf7783ca106

maxschuster commented 7 years ago

Did you have time to test, what I suggested here?

pradeep220 commented 7 years ago

The fix is working. I messed up my test case. Also, instead of value change listener (it didnt work even with fix), I have used shortcut listener for Enter key, utilized .getValue() from text field and it worked on all browsers.

maxschuster commented 7 years ago

I will close this issue then. Please open another issue, if you still have issues with the value change listener.

maxschuster commented 7 years ago

Updated version 3.0-alpha-2 is available in the Vaadin Directory