Open kennethlarsen opened 7 years ago
Basically doing some thing like:
//typeahead.js Customizations
allowCharacterDeletion: false, //@public
setValue : function(selection) {
selection = this.transformSelection(selection);
if(selection) {
this.get('_typeahead').typeahead('val', selection);
} else if (!this.get('allowCharacterDeletion')){
this.get('_typeahead').typeahead('val', '');
}
},
returns the expected behavior.
Maybe this should be the default behaviour.
This appears to be working for me. I am pretty sure this feature only works with Strings though.
Just tested with a ember-data model and it is working.
After some experimentation I can see this issue now. I have included it as part of a bigger cleanup issue.
Does this issue still valid? I can't reproduce it! If anyone can give a hint or twiddle on how to reproduce it. I will be happy to fix it.
@mnifakram yes, this should still be an unresolved bug.
Happening for me in v3.0.0
Happening in v3.1.0.
There's an issue with {{aupac-typeahead}} where deleting a single character in the input removes the entire input value. This is very annoying for correcting typos.
This is happening when suggestions are objects (which we fetch from an api).
Basically it looks like this gets called when I press backspace
this.get('_typeahead').typeahead('val', '');
(line 79 in addon/components/aupac-typeahead.js)