Skip to content

Commit

Permalink
chore: update select demo
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Nov 30, 2022
1 parent d764620 commit 9cc719c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/select/_example/custom-selected.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const CustomSelected = () => {
clearable
defaultValue={'1'}
style={{ width: '300px', marginRight: '20px' }}
valueDisplay={({ value }) => `选中${value}`}
valueDisplay={({ value }) => (value ? `选中${value}` : null)}
>
{options.map((v, i) => (
<Select.Option value={v.value} key={i}>
Expand All @@ -49,9 +49,6 @@ const CustomSelected = () => {
{ label: '选项八', value: '8' },
{ label: '选项九', value: '9' },
]}
valueDisplay={({ value }) =>
value.length > 0 ? value.map((v, idx) => <Tag key={idx}>{`${v}选项`}</Tag>) : null
}
/>
</Space>
);
Expand Down

0 comments on commit 9cc719c

Please sign in to comment.