UNPKG

1.06 kBJavaScriptView Raw
1import _extends from 'babel-runtime/helpers/extends';
2import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3import ConfigProvider from '../config-provider';
4import TreeSelect from './tree-select';
5
6export default ConfigProvider.config(TreeSelect, {
7 transform: /* istanbul ignore next */function transform(props, deprecated) {
8 if ('shape' in props) {
9 deprecated('shape', 'hasBorder', 'TreeSelect');
10
11 var _props = props,
12 shape = _props.shape,
13 others = _objectWithoutProperties(_props, ['shape']);
14
15 props = _extends({ hasBorder: shape !== 'arrow-only' }, others);
16 }
17
18 if ('container' in props) {
19 deprecated('container', 'popupContainer', 'TreeSelect');
20
21 var _props2 = props,
22 container = _props2.container,
23 _others = _objectWithoutProperties(_props2, ['container']);
24
25 props = _extends({ popupContainer: container }, _others);
26 }
27
28 return props;
29 }
30});
\No newline at end of file