UNPKG

1.04 kBJavaScriptView Raw
1import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
2import ConfigProvider from '../config-provider';
3import Search from './Search';
4
5export default ConfigProvider.config(Search, {
6 transfrom: /* istanbul ignore next */function transfrom(props, deprecated) {
7 var onInputFocus = props.onInputFocus,
8 overlayVisible = props.overlayVisible,
9 combox = props.combox,
10 others = _objectWithoutProperties(props, ['onInputFocus', 'overlayVisible', 'combox']);
11
12 var newprops = others;
13
14 if (onInputFocus) {
15 deprecated('onInputFocus', 'onFocus', 'Search');
16 newprops.onFocus = onInputFocus;
17 }
18 if ('overlayVisible' in props) {
19 deprecated('overlayVisible', 'visible', 'Search');
20 newprops.visible = overlayVisible;
21 }
22 if (combox) {
23 deprecated('combox', 'popupContent', 'Search');
24 newprops.popupContent = combox;
25 }
26
27 return newprops;
28 }
29});
\No newline at end of file