Open kamilchlebek opened 5 years ago
Hey @kamilchlebek , thank you for the suggestion. Sadly for the time being I do not plan on adding this. If you look at the ListPicker
widget from NativeScript it follows the same concept. If you want the value you can simply handle the selectedIndexChanged
and update your value. Or if you need it only for save, you can pull the value by its index before sending the data to your backend.
Thanks for your response. I handle it on my side. I just wanted to share the suggestion with you :)
I'm using DropDown in angular application. I've successfully provided values using
ValueList
. Then I've created ReactiveForm and attachedformControlName
toDropDown
component. Unfortunately form is updated with selected index instead of selected value.I've seen few tasks regarding this issue. Nevertheless maybe it would be good to provide users with some configuration to change that behavior? Some libraries provide
bindLabel
andbindValue
options.It's especially inconvenient when you provide items using async pipe:
[items]="items$ | async
, because to fetch selected value you have to create another combination of Observables and operators to fetch value for given index.