ProgressNS / nativescript-ui-feedback

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

RadAutoCompleteTextView suggestions view shows up unexpectedly when the container tab gets visible #1394

Open csimpi opened 4 years ago

csimpi commented 4 years ago

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): √ Getting NativeScript components versions information... √ Component nativescript has 6.5.0 version and is up to date. √ Component tns-core-modules has 6.5.1 version and is up to date. √ Component tns-android has 6.5.1 version and is up to date. × Component tns-ios is not installed.

Describe the bug

When add initial value to the autocomplete field with addToken and it gets hidden (for example when you switch a tab) then gets visible again, the suggestions pop up unexpectedly. Even if the input is not focused it shows the suggestions with zero entries.

To Reproduce

Open this sample below, switch to Search Tab then switch back to Home Tab, the suggestion view pops up. If you add multiple autocompletes the suggestion pops are for each at the same time.

https://play.nativescript.org/?template=play-ng&id=WQS4Qx

For the sample I've used the official doc's corresponding example: https://github.com/NativeScript/nativescript-ui-samples-angular/blob/master/autocomplete/app/examples/preselected-tokens/autocomplete-preselected-tokens.component.ts

A photo about the unexpected suggestion view:

image

Interesting result, if you switch to the Account tab, this error doesn't appear. Also, the loaded event fires when the issue appears so this looks like some redundant/duplicated initializing of the view.

Expected behavior

The suggestions view should appear only if the text field gets focused and edited by user.

Sample project

I've attached a sample link above, please follow the steps to reproduce the issue.

Additional context

rnmhdn commented 4 years ago

See here to lose some hope :D

csimpi commented 4 years ago

@aranmohyeddin Actually they're usually responsive (more responsive like Angular community) and helped me a lot on their official dev channel. They have an extreme amount of reports, so we have to be patient. I have some concerns about they close tickets with no real answers sometimes instead of waiting for the reporter's answer though, but it's OK. I hope they'll grow and will be able to support us more :)

rnmhdn commented 4 years ago

I don't think not even giving a comment after 45 days is reasonable. If they can't support it, then they should opensource the components so we can fix our problems ourselves.

rnmhdn commented 4 years ago

@csimpi meanwhile, there are two possible workarounds, see #1023 and this SO question

facetious commented 4 years ago

Here's a playground that probably does what you want: https://play.nativescript.org/?template=play-ng&id=WQS4Qx&v=2

I set the visibility = 'hidden' on subsequent loads, and set it back to 'visible' when the (focus) event fires.

rnmhdn commented 4 years ago

@facetious please see the SO question I linked to for some drawbacks of that workaround and for a better workaround.