Skip to content

New setOptionProps property on the select component #6191

@CCherry07

Description

@CCherry07
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

The options prop passed in directly does not use select-option to build list, and cannot bind properties such as title above option. It seems that there is no way to deal with it at present.

What does the proposed API look like?

Add the setOptionProps property to the select component, taking each option data as its argument, and dynamically bind the option properties.

<a-select :setOptionProps="(option: OptionType) => ({ title: option.label })"
v-model:value="screeningCondition.collegeId" placeholder="Please select a secondary college" :options="options.collegeList">
</a-select>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions