Promact / md2

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Collapse, Colorpicker, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
http://code.promactinfo.com/md2/
MIT License
379 stars 111 forks source link

[Question] Md2Autocomplete and textChange emit old value #272

Closed maratoss closed 7 years ago

maratoss commented 7 years ago

Hi. Just a question. When i subscribed on Md2Autocomplete.textChange i am waiting for actual value but i see there is previous result. e.g. i typed 'Hello', but emitted value is 'Hell' http://plnkr.co/edit/mXFOxwDB7jFmeotrausc?p=preview

And one more: When i key 'left arrow' or any other keys which do not affect somehow on text, the emit is performed. But i believe that emit should not be performed.

krupa310 commented 7 years ago

@maratoss will update it in next build

maratoss commented 7 years ago

@krupa310

Thanks. I see you left the emit value in keyDown handler and now we have it also in keyUp handler => it will emit twice, is it correct behavior?

And what about second point? I guess it should emit only when text is really changed, but as i said it emits even if you push any arrows or Esc Or Enter etc...

krupa310 commented 7 years ago

@maratoss no it should trigger only once(on KyeUp). I had mistakenly keep it in KeyDown.

For your second point: Currently, we are not planning for that.