Material-ui: [AutoComplete] Component force sets html attribute autocomplete='off'

Created on 7 Jul 2016  路  3Comments  路  Source: mui-org/material-ui

Problem description

This should be allowed to be optionally set by a property just like a TextField

Steps to reproduce

return _react2.default.createElement(
        'div',
        { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
        _react2.default.createElement(_TextField2.default, _extends({}, other, {
          ref: 'searchTextField',
          **autoComplete: 'on',**
          value: searchText,
          onChange: this.handleChange,
          onBlur: this.handleBlur,
          onFocus: this.handleFocus,
          onKeyDown: this.handleKeyDown,
          floatingLabelText: floatingLabelText,
          hintText: hintText,
          fullWidth: fullWidth,
          multiLine: false,
          errorStyle: errorStyle
        })),

Versions

  • Material-UI: 0.15.1
  • React: 15.1.0
  • Browser: Chrome 52.0.2743.60 beta-m (64-bit)
bug 馃悰 Autocomplete

Most helpful comment

I agree, I think that we should all users to override the autoComplete property.
Actually, I think that it's a more general issue where we spread the {...other} properties at the beginning and not at the end of the component. Hence, losing precedence.

All 3 comments

I use autocomplete as part of a form. This would be a useful feature. Easy fix. I can provide a PR.

I agree, I think that we should all users to override the autoComplete property.
Actually, I think that it's a more general issue where we spread the {...other} properties at the beginning and not at the end of the component. Hence, losing precedence.

Closed by #4783

Was this page helpful?
0 / 5 - 0 ratings