Skip to content

当value 没有 label 属性时,并且options 不包含 value 时,应当将 value 作为 label #1028

@xulingling0

Description

@xulingling0

复现demo:

https://codesandbox.io/p/sandbox/amazing-ace-jvdx6j?file=%2FApp.tsx%3A46%2C30

复现步骤:

第一步: 设置 value 包含 label

 <Select value={{value: 'test', label: 'custom text'}} />

第二步:更新value 为 简单类型

 <Select value={'test'} />

预期表现:

第二步后,选择器内文字为 test

实际表现

第二步后,选择器内文字为上一次缓存的文案 custom text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions