Skip to content

Commit

Permalink
bugfix: fix options data change but not rerender
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghansong committed Apr 21, 2022
1 parent d24fcaf commit 6d5eb5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/components/src/select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ const SelectOption = defineComponent({
default: () =>
options.map((option: any) => {
if (typeof option === 'string') {
return h(ElOption, { value: option, label: option }, slots)
return h(ElOption, { key: option, value: option, label: option }, slots)
} else {
return h(
ElOption,
{
key: option.value || option,
...option,
},
slots
Expand Down

0 comments on commit 6d5eb5b

Please sign in to comment.