React-jsonschema-form: Support for input 'autocomplete' attribute?

Created on 24 Apr 2018  路  7Comments  路  Source: rjsf-team/react-jsonschema-form

Prerequisites

Description

It looks like setting autocomplete attribute for inputs is not supported (without writing a custom component).

It would help to improve usability of forms. See for example a nice Google Developer post.

How to implement

I think it could be added like autofocus got added. Is this the best way to do it?

enhancement good first issue

Most helpful comment

Yea this would be awesome and straightforward to add IMO.

I think the best approach would be allow something like this in the UI schema:

{
  "firstName": {
    "ui:autofocus": true,
    "ui:emptyValue": "",
    "ui:autocomplete": "fname"
  }
}

All 7 comments

+1 this would be awesome

Yea this would be awesome and straightforward to add IMO.

I think the best approach would be allow something like this in the UI schema:

{
  "firstName": {
    "ui:autofocus": true,
    "ui:emptyValue": "",
    "ui:autocomplete": "fname"
  }
}

Yes, anyone interested in writing a PR for this?

@levilian interested in making a PR for this?

@levilian

@epicfaace this feature is done in my PR with commit

@james-gc thanks for your PR! Do you mind putting those changes for ui:autocomplete in a separate PR? That will help us to approve it faster!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pablen picture pablen  路  3Comments

Eric24 picture Eric24  路  3Comments

epicfaace picture epicfaace  路  3Comments

mammad2c picture mammad2c  路  3Comments

norim13 picture norim13  路  3Comments