Open xulingling0 opened 4 months ago
https://codesandbox.io/p/sandbox/amazing-ace-jvdx6j?file=%2FApp.tsx%3A46%2C30
第一步: 设置 value 包含 label
label
<Select value={{value: 'test', label: 'custom text'}} />
第二步:更新value 为 简单类型
<Select value={'test'} />
第二步后,选择器内文字为 test
test
第二步后,选择器内文字为上一次缓存的文案 custom text
custom text
复现demo:
https://codesandbox.io/p/sandbox/amazing-ace-jvdx6j?file=%2FApp.tsx%3A46%2C30
复现步骤:
第一步: 设置 value 包含
label
第二步:更新value 为 简单类型
预期表现:
第二步后,选择器内文字为
test
实际表现
第二步后,选择器内文字为上一次缓存的文案
custom text