Skip to content

Commit

Permalink
fix: TextArea missing maxLength attribute (#32448)
Browse files Browse the repository at this point in the history
  • Loading branch information
MOHAMMADArsalan authored Oct 13, 2021
1 parent 3b27f47 commit ee703c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/input/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const TextArea = React.forwardRef<TextAreaRef, TextAreaProps>(
onChange={handleChange}
onCompositionEnd={onInternalCompositionEnd}
ref={innerRef}
maxLength={maxLength}
/>
);

Expand Down
1 change: 1 addition & 0 deletions components/input/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3317,6 +3317,7 @@ exports[`renders ./components/input/demo/textarea-show-count.md correctly 1`] =
>
<textarea
class="ant-input"
maxlength="100"
/>
</div>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
`;

Expand Down

0 comments on commit ee703c1

Please sign in to comment.