pietro909 pietro909 - 14 days ago 6
React JSX Question

Redux form field autocapitalize attribute

I'm trying to pass the non-standard autocapitalize attribute to a redux-form Field:

<Field
name="theName"
autocapitalize="none"
component={Input}
label="Name"
placeholder="name"
/>


But I can't see the attribute in the generated HTML.
Is there a way to pass extra attributes?

Thanks.

Answer

React props use the camelCase syntax.. so autocapitalize needs to be autoCapitalize.

Here's a list of all supported HTML props.

Comments