diff --git a/lerna.json b/lerna.json index bf4fb14ca3..54a818afee 100644 --- a/lerna.json +++ b/lerna.json @@ -14,5 +14,5 @@ "packages/*", "packages/themes/*" ], - "version": "1.27.0" + "version": "1.28.0" } diff --git a/packages/core/dist/components/Autocomplete/Autocomplete.js b/packages/core/dist/components/Autocomplete/Autocomplete.js index 71ac605aa3..a076bfee12 100644 --- a/packages/core/dist/components/Autocomplete/Autocomplete.js +++ b/packages/core/dist/components/Autocomplete/Autocomplete.js @@ -70,9 +70,10 @@ var Autocomplete = exports.Autocomplete = function (_React$PureComponent) { var _this = _possibleConstructorReturn(this, (Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call(this, props)); - _this.id = (0, _lodash2.default)('autocomplete_'); + _this.id = _this.props.id || (0, _lodash2.default)('autocomplete_'); _this.labelId = (0, _lodash2.default)('autocomplete_header_'); _this.listboxId = (0, _lodash2.default)('autocomplete_owned_listbox_'); + _this.loader = null; return _this; } @@ -115,12 +116,14 @@ var Autocomplete = exports.Autocomplete = function (_React$PureComponent) { value: function renderChildren(getInputProps) { var _this3 = this; - // Extend props on the TextField, by passing them through - // Downshift's `getInputProps` method + // Extend props on the TextField, by passing them + // through Downshift's `getInputProps` method return _react2.default.Children.map(this.props.children, function (child) { if (isTextField(child)) { var propOverrides = { 'aria-controls': _this3.listboxId, + autoComplete: _this3.props.autoCompleteLabel, + focusTrigger: _this3.props.focusTrigger, id: _this3.id, onBlur: child.props.onBlur, onChange: child.props.onChange, @@ -206,6 +209,7 @@ var Autocomplete = exports.Autocomplete = function (_React$PureComponent) { Autocomplete.defaultProps = { ariaClearLabel: 'Clear typeahead and search again', + autoCompleteLabel: 'nope', clearInputText: 'Clear search', itemToString: function itemToString(item) { return item ? item.name : ''; @@ -219,6 +223,13 @@ Autocomplete.propTypes = { * Screenreader-specific label for the Clear search `