Skip to content

Commit

Permalink
fix: select item display not update
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Nov 4, 2020
1 parent 36b2d47 commit a3a0600
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion antdv-demo
6 changes: 4 additions & 2 deletions components/vc-select/Selector/SingleSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pickAttrs from '../../_util/pickAttrs';
import Input from './Input';
import { InnerSelectorProps } from '.';
import { computed, defineComponent, ref, VNodeChild, watch } from 'vue';
import { computed, defineComponent, Fragment, ref, VNodeChild, watch } from 'vue';
import PropTypes from '../../_util/vue-types';

interface SelectorProps extends InnerSelectorProps {
Expand Down Expand Up @@ -125,7 +125,9 @@ const SingleSelector = defineComponent<SelectorProps>({
{/* Display value */}
{!combobox.value && item && !hasTextInput.value && (
<span class={`${prefixCls}-selection-item`} title={title.value}>
{Array.isArray(item.label) ? item.label.map(la => la) : item.label}
<Fragment key={item.key || item.value}>
{item.label}
</Fragment>
</span>
)}

Expand Down

1 comment on commit a3a0600

@tangjinzhou
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref #3099

Please sign in to comment.