This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115
stars
21
forks
source link
AutoCompleteTextView suggestion view becomes visible by default without searching #1455
The suggestion view for the autocomplete field is visible by default just after the text field is set.
COMPONENT:
@ViewChild("conceptAutocomplete", {
static: true
})
autocompleteField: RadAutoCompleteTextViewComponent;
// ....
// Called from ngOnChanges when the input object is provided with a new value:
private setFormWithObject(object) {
this.autocompleteField.autoCompleteTextView.text = object.name;
}
How to make the suggestion view only appear when the text field actually changes or get the focus?
My guess is that changing the text property by code actually creates a focus on the element and the search of suggestions is triggered and the view is displayed.
WORKAROUND NOTE
A workaround found is to initialize (inside ngOnInit) minimumCharactersToSearch to a high number and change it on the focus event:
I have tried on the onLoad event:
event.object.suggestionView.android.visibility = "hidden";
This works but when I do on the focus event:
event.object.suggestionView.android.visibility = "visible";
The suggestion view no longer becomes visible.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
Tell us about the problem
The suggestion view for the autocomplete field is visible by default just after the text field is set.
COMPONENT:
TEMPLATE:
How to make the suggestion view only appear when the text field actually changes or get the focus?
My guess is that changing the text property by code actually creates a focus on the element and the search of suggestions is triggered and the view is displayed.
WORKAROUND NOTE A workaround found is to initialize (inside ngOnInit) minimumCharactersToSearch to a high number and change it on the focus event:
I have tried on the onLoad event:
event.object.suggestionView.android.visibility = "hidden";
This works but when I do on the focus event:event.object.suggestionView.android.visibility = "visible";
The suggestion view no longer becomes visible.Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with: