Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xulingling0 opened this issue Feb 26, 2024 · 0 comments · May be fixed by #1029

Comments

@xulingling0
Copy link
Contributor

复现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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant