Skip to content

Accessing selected value instead of selected index #208

Description

@kamilchlebek

I'm using DropDown in angular application. I've successfully provided values using ValueList. Then I've created ReactiveForm and attached formControlName to DropDown 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 and bindValue 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions