fix: TextArea missing maxLength attribute (#32448)

This commit is contained in:
Mohammad Arsalan 2021-10-13 08:55:55 +05:00 committed by GitHub
parent 3b27f47097
commit ee703c187e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,7 @@ const TextArea = React.forwardRef<TextAreaRef, TextAreaProps>(
onChange={handleChange}
onCompositionEnd={onInternalCompositionEnd}
ref={innerRef}
maxLength={maxLength}
/>
);

View File

@ -3317,6 +3317,7 @@ exports[`renders ./components/input/demo/textarea-show-count.md correctly 1`] =
>
<textarea
class="ant-input"
maxlength="100"
/>
</div>
`;

View File

@ -245,6 +245,7 @@ exports[`TextArea allowClear should not show icon if value is undefined, null or
exports[`TextArea maxLength should support maxLength 1`] = `
<textarea
class="ant-input"
maxlength="10"
/>
`;