Skip to content

Commit f12d53b

Browse files
authored
Merge pull request #1111 from zkwolf/fix-tree-select-dataRef-undefined
fix: treeNode dataRef is undefined
2 parents 8e80e13 + 5f9ebe8 commit f12d53b

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

components/tree-select/index.jsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,23 @@ const TreeSelect = {
134134

135135
const clearIcon = <Icon type="close-circle" class={`${prefixCls}-clear-icon`} theme="filled" />;
136136
const VcTreeSelectProps = {
137-
props: {
138-
switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps),
139-
inputIcon,
140-
removeIcon,
141-
clearIcon,
142-
...rest,
143-
getPopupContainer: getPopupContainer || getContextPopupContainer,
144-
dropdownClassName: classNames(dropdownClassName, `${prefixCls}-tree-dropdown`),
145-
prefixCls,
146-
dropdownStyle: { maxHeight: '100vh', overflow: 'auto', ...dropdownStyle },
147-
treeCheckable: checkable,
148-
notFoundContent: notFoundContent || renderEmpty(h, 'Select'),
149-
__propsSymbol__: Symbol(),
150-
},
137+
props: Object.assign(
138+
{
139+
switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps),
140+
inputIcon,
141+
removeIcon,
142+
clearIcon,
143+
...rest,
144+
getPopupContainer: getPopupContainer || getContextPopupContainer,
145+
dropdownClassName: classNames(dropdownClassName, `${prefixCls}-tree-dropdown`),
146+
prefixCls,
147+
dropdownStyle: { maxHeight: '100vh', overflow: 'auto', ...dropdownStyle },
148+
treeCheckable: checkable,
149+
notFoundContent: notFoundContent || renderEmpty(h, 'Select'),
150+
__propsSymbol__: Symbol(),
151+
},
152+
treeData ? { treeData } : {},
153+
),
151154
class: cls,
152155
on: { ...this.$listeners, change: this.onChange },
153156
ref: 'vcTreeSelect',

0 commit comments

Comments
 (0)