how to clear selection with [accept-user-input]=false
IMPORTANT Please be specific with an example. An issue with no example may be closed.
Steps to reproduce and a minimal demo http://plnkr.co/edit/D7d8uHG9XQfpsV0LuqcG?p=preview
Current behavior step 1: select Asia step2: clear out textbox. step3: create a blur event by clicking outside the textbox step3: notice how it gets repopulated with Asia.
this is separate from https://github.com/ng2-ui/auto-complete/issues/277, as I want to clear the value out completely.
It appears it is related to a combination of [list-formatter]="autocompleListFormatter" and accept-user-input=false
it seems to be related to this bit of code:
if (_this.inputEl && hasRevertValue && _this.acceptUserInput === false && currentItem === null) { _this.selectNewValue(_this.revertValue); } else if (_this.inputEl && _this.acceptUserInput === true && typeof currentItem === "undefined" && event && event.target.value) { _this.enterNewText(event.target.value); }
I think you need to use select-on-blur