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>
Balram Singh
  • 1,576
  • 19
  • 30
  • 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. – eterps Nov 09 '18 at 15:53

1 Answers1

15

You are missing the capital

e.g. maxLength="2"

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Lucas SenCab A Ugh
  • 336
  • 1
  • 4
  • 14