PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IOS: When user opens the dropdown, by default, it shows as if first option is selected (highlighted in the dial), when user taps on 'done' button without rolling the dial, then first option is not selected

vasudevpareek07 opened this issue · comments

In IOS, When user opens the dropdown, by default it shows as if first option is selected (highlighted in the dial), when user taps on 'done' button without rolling the dial, then first option is not shown as selected in the dropdown field, whereas since it was shown as selected when opening the dropdown, first option should be ideally shown as selected in the dropdown field.

version of "nativescript-drop-down": "7.1.0",
version of "nativescript": "6.7.8",
version of Angular: "8.2.0"

Any quick help would be appreciated. Thanks.

Hey @vasudevpareek07 , this is how the list component works in iOS. You will have to add a custom not selected value as part of the list and adjust your logic based on that.

@PeterStaev, Thanks for the quick response. Is it possible to style a particular option in dropdown.

Currently this is not possible.

@PeterStaev, I have added a option called as 'Select Client' in the list as first option. I am emitting the data to the parent component if the selectedIndex is greater than 0 in IOS, but when I select the first option ('Select Client'), that value is shown as selected in the dropdown field although I am setting the selectedIndex = null if selectedOption index is 0. Is there any other way I can reset/deselect the selected option ?

No there isn't. That's what I mean that in iOS the list picker always shows the first item as selected, but it can be that it isn't actually selected.

No further response so closing this one for now. In case you still have problems, please provide more details.