Skip to content

Commit

Permalink
fix: Cascader item key type error #219
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Oct 12, 2018
1 parent 0db7b0a commit 7082d6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/vc-cascader/Menus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import arrayTreeFilter from 'array-tree-filter'
import BaseMixin from '../_util/BaseMixin'

export default {
name: 'CascaderMenus',
mixins: [BaseMixin],
props: {
value: PropTypes.array.def([]),
Expand Down Expand Up @@ -46,13 +47,14 @@ export default {
const onSelect = (e) => {
this.__emit('select', option, menuIndex, e)
}
const key = option[this.getFieldName('value')]
const expandProps = {
attrs: {
},
on: {
click: onSelect,
},
key: option[this.getFieldName('value')],
key: Array.isArray(key) ? key.join('__ant__') : key,
}
let menuItemCls = `${prefixCls}-menu-item`
const hasChildren = option[this.getFieldName('children')] &&
Expand Down

0 comments on commit 7082d6f

Please sign in to comment.