ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 123 forks source link

'Undefined' text in input text after tabbing #259

Open TomaszBorczyk opened 7 years ago

TomaszBorczyk commented 7 years ago

When tabbing if nothing is selected/typed or just empty spaces typed, input value is displayed as 'undefined'; I'm using Angular 4 reactive forms.

Another similar issue: type something, select from list (or not), deselect the input (input value stays as it should), then select again without changing its value, then tab or enter - value changes to undefined.

Plunker from docs to reproduce (just select the input and tab, text will be displayed as undefined): http://plnkr.co/edit/2osUq6?p=preview

I would like input to be blank if tabbed without typing anything/typing spaces. Is there any workaround? I tried using [accept-user-input]="false", but it disables blank input completely

allenhwkim commented 7 years ago

@evasquez26 can you take a look into it? Even with the recent release, this problem still exists.

ghost commented 7 years ago

@allenhwkim This might sound a little silly, but I've just installed the package and I cannot see the last implemented changes in the dist files, could you please check?

almothafar commented 7 years ago

I got this issue here too, it is annoying, I want to use to keep the option for him to use from the auto-complete list or let him type anything a user wants.

almothafar commented 7 years ago

I used this fork: "@ngui/auto-complete": "github:galkinrost/auto-complete#ef931a7fa2aec095ca64155df2197a2432761711", And was very helpful to solve my issue.

almothafar commented 7 years ago

You may want to see my pull request #265 You may also test my fork "@ngui/auto-complete": "github:almothafar/auto-complete#0.14.2",