Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}) : [];
}
return _react2['default'].createElement(
_select2['default'],
(0, _extends3['default'])({}, this.props, { className: cls, mode: 'combobox', optionLabelProp: optionLabelProp, getInputElement: this.getInputElement, notFoundContent: notFoundContent }),
options
);
}
}]);
return AutoComplete;
}(_react2['default'].Component);
exports['default'] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
prefixCls: 'ant-select',
transitionName: 'slide-up',
optionLabelProp: 'children',
choiceTransitionName: 'zoom',
showSearch: false,
filterOption: false
};
module.exports = exports['default'];
options = dataSource ? dataSource.map(function (item) {
if (React.isValidElement(item)) {
return item;
}
switch (_typeof(item)) {
case 'string':
return React.createElement(_rcSelect.Option, {
key: item
}, item);
case 'object':
return React.createElement(_rcSelect.Option, {
key: item.value
}, item.text);
default:
throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
}
}) : [];
}
optionLabelProp = optionLabelProp || 'value';
}
var modeConfig = {
multiple: mode === 'multiple' || multiple,
tags: mode === 'tags' || tags,
combobox: isCombobox
};
return _react2['default'].createElement(_rcSelect2['default'], (0, _extends3['default'])({}, restProps, modeConfig, { prefixCls: prefixCls, className: cls, optionLabelProp: optionLabelProp || 'children', notFoundContent: notFoundContent }));
}
}]);
return Select;
}(_react2['default'].Component);
exports['default'] = Select;
Select.Option = _rcSelect.Option;
Select.OptGroup = _rcSelect.OptGroup;
Select.defaultProps = {
prefixCls: 'ant-select',
showSearch: false,
transitionName: 'slide-up',
choiceTransitionName: 'zoom'
};
Select.propTypes = SelectPropTypes;
Select.contextTypes = {
antLocale: _propTypes2['default'].object
};
module.exports = exports['default'];
options = dataSource ? dataSource.map(function (item) {
if (_react2['default'].isValidElement(item)) {
return item;
}
switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3['default'])(item)) {
case 'string':
return _react2['default'].createElement(
_rcSelect.Option,
{ key: item },
item
);
case 'object':
return _react2['default'].createElement(
_rcSelect.Option,
{ key: item.value },
item.text
);
default:
throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
}
}) : [];
}
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderAutoComplete);
}
}]);
return AutoComplete;
}(React.Component);
exports["default"] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
transitionName: 'slide-up',
optionLabelProp: 'children',
choiceTransitionName: 'zoom',
showSearch: false,
filterOption: false
};
//# sourceMappingURL=index.js.map
}
var modeConfig = {
multiple: mode === 'multiple' || multiple,
tags: mode === 'tags' || tags,
combobox: isCombobox
};
return _react2['default'].createElement(_rcSelect2['default'], (0, _extends3['default'])({}, restProps, modeConfig, { prefixCls: prefixCls, className: cls, optionLabelProp: optionLabelProp || 'children', notFoundContent: notFoundContent }));
}
}]);
return Select;
}(_react2['default'].Component);
exports['default'] = Select;
Select.Option = _rcSelect.Option;
Select.OptGroup = _rcSelect.OptGroup;
Select.defaultProps = {
prefixCls: 'ant-select',
showSearch: false,
transitionName: 'slide-up',
choiceTransitionName: 'zoom'
};
Select.propTypes = SelectPropTypes;
Select.contextTypes = {
antLocale: _propTypes2['default'].object
};
module.exports = exports['default'];
}) : [];
}
return _react2['default'].createElement(
_select2['default'],
(0, _extends3['default'])({}, this.props, { className: cls, mode: 'combobox', optionLabelProp: optionLabelProp, getInputElement: this.getInputElement, notFoundContent: notFoundContent }),
options
);
}
}]);
return AutoComplete;
}(_react2['default'].Component);
exports['default'] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
prefixCls: 'ant-select',
transitionName: 'slide-up',
optionLabelProp: 'children',
choiceTransitionName: 'zoom',
showSearch: false,
filterOption: false
};
module.exports = exports['default'];
value: function blur() {
this.select.blur();
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderAutoComplete);
}
}]);
return AutoComplete;
}(React.Component);
exports["default"] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
transitionName: 'slide-up',
optionLabelProp: 'children',
choiceTransitionName: 'zoom',
showSearch: false,
filterOption: false
};
//# sourceMappingURL=index.js.map