PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

How can I reset the dd with the HINT value after selection of an item? #231

Closed ittrad-mobile-lab closed 4 years ago

ittrad-mobile-lab commented 4 years ago

Doing selectedIndex = null and using the HINT attribute I've succeeded to initialize the dd with the HINT value which is awesome 👍 , but after selection of a certain item of dd the HINT value become unselectable so I wasn't able to reset the dd list.

Some trick? Any hint will be appreciated. Best

PeterStaev commented 4 years ago

If you want the user to be able to clear the value you can either add a button that will set the selectedIndex to null or you should add a default value item in the source of the drop down that will server as your not selected value.

ittrad-mobile-lab commented 4 years ago

The button solution was the most elegant for me. Many thanks for your quick support.

Hopefully you'll succeed to include (left side near the small arrow) this reset button on the new versions of that nice and very useful component.

PeterStaev commented 4 years ago

Well some people dont need such a think, or would like the default unselected value in the list itself. So I will leave the decision to the end user 😉