5

Max length is not working in Input of semantic-ui-react.

<Input {...input} type={type} size={inputSize} transparent={transparent} disabled={disabled}>
   <input data-selector={`${dataSelector}-input`} maxlength="2" />
</Input>
1
  • 3
    Not sure why this was downvoted. The maxLength prop is not in the semantic ui documentation. Changing to camel-case is one of those things you are expected to 'just know' after working with React for a while. Commented Nov 9, 2018 at 15:53

1 Answer 1

15

You are missing the capital

e.g. maxLength="2"

Sign up to request clarification or add additional context in comments.

1 Comment

Yes correct, thank you, it was a very easy thing that I missed. Apologies for asking it here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.