如何在语义-ui-react的输入中添加最大长度?

Bal*_*ngh 3 semantic-ui-react

最大长度不适用于语义 - 反应的输入.

<Input {...input} type={type} size={inputSize} transparent={transparent} disabled={disabled}>
   <input data-selector={`${dataSelector}-input`} maxlength="2" />
</Input>
Run Code Online (Sandbox Code Playgroud)

小智 8

你错过了首都

例如 maxLength="2"