Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dropdownStyle = _a.dropdownStyle,
restProps = __rest(_a, ["prefixCls", "className", "size", "notFoundContent", "dropdownStyle"]);
var cls = (0, _classnames2['default'])((_classNames = {}, (0, _defineProperty3['default'])(_classNames, prefixCls + '-lg', size === 'large'), (0, _defineProperty3['default'])(_classNames, prefixCls + '-sm', size === 'small'), _classNames), className);
var checkable = restProps.treeCheckable;
if (checkable) {
checkable = _react2['default'].createElement('span', { className: prefixCls + '-tree-checkbox-inner' });
}
return _react2['default'].createElement(_rcTreeSelect2['default'], (0, _extends3['default'])({}, restProps, { prefixCls: prefixCls, className: cls, dropdownStyle: (0, _extends3['default'])({ maxHeight: '100vh', overflow: 'auto' }, dropdownStyle), treeCheckable: checkable, notFoundContent: notFoundContent }));
}
}]);
return TreeSelect;
}(_react2['default'].Component);
TreeSelect.TreeNode = _rcTreeSelect.TreeNode;
TreeSelect.SHOW_ALL = _rcTreeSelect.SHOW_ALL;
TreeSelect.SHOW_PARENT = _rcTreeSelect.SHOW_PARENT;
TreeSelect.SHOW_CHILD = _rcTreeSelect.SHOW_CHILD;
TreeSelect.defaultProps = {
prefixCls: 'ant-select',
transitionName: 'slide-up',
choiceTransitionName: 'zoom',
showSearch: false,
dropdownClassName: 'ant-select-tree-dropdown'
};
// Use Select's locale
var injectSelectLocale = (0, _injectLocale2['default'])('Select', {});
exports['default'] = injectSelectLocale(TreeSelect);
module.exports = exports['default'];
prefixCls: prefixCls,
className: cls,
dropdownStyle: _extends({ maxHeight: '100vh', overflow: 'auto' }, dropdownStyle),
notFoundContent: notFoundContent,
treeCheckable: checkable,
ref: this.saveTreeSelect,
searchPlaceholder: '\u8BF7\u641C\u7D22'
}));
};
return TreeSelect;
}(_react.Component);
TreeSelect.TreeNode = _rcTreeSelect.TreeNode;
TreeSelect.SHOW_ALL = _rcTreeSelect.SHOW_ALL;
TreeSelect.SHOW_PARENT = _rcTreeSelect.SHOW_PARENT;
TreeSelect.SHOW_CHILD = _rcTreeSelect.SHOW_CHILD;
;
TreeSelect.propTypes = propTypes;
TreeSelect.defaultProps = defaultProps;
exports["default"] = TreeSelect;
module.exports = exports['default'];