mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
fix: TextArea height bug (#33055)
* fix: TextArea height bug when has `showCount` close #33049 * fix snapshot * revert form demo
This commit is contained in:
parent
2ab4e565d6
commit
264b3514d8
@ -7,11 +7,6 @@
|
||||
// = Children Component =
|
||||
// ================================================================
|
||||
.@{form-item-prefix-cls} {
|
||||
.@{ant-prefix}-mentions,
|
||||
textarea.@{ant-prefix}-input {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// input[type=file]
|
||||
.@{ant-prefix}-upload {
|
||||
background: transparent;
|
||||
|
@ -3332,6 +3332,7 @@ exports[`renders ./components/input/demo/textarea-show-count.md correctly 1`] =
|
||||
<div
|
||||
class="ant-input-textarea ant-input-textarea-show-count"
|
||||
data-count="0 / 100"
|
||||
style="height:120px"
|
||||
>
|
||||
<textarea
|
||||
class="ant-input"
|
||||
|
@ -22,5 +22,8 @@ const onChange = e => {
|
||||
console.log('Change:', e.target.value);
|
||||
};
|
||||
|
||||
ReactDOM.render(<TextArea showCount maxLength={100} onChange={onChange} />, mountNode);
|
||||
ReactDOM.render(
|
||||
<TextArea showCount maxLength={100} style={{ height: 120 }} onChange={onChange} />,
|
||||
mountNode,
|
||||
);
|
||||
```
|
||||
|
@ -47,8 +47,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-textarea {
|
||||
&-show-count::after {
|
||||
&-textarea-show-count {
|
||||
// https://github.com/ant-design/ant-design/issues/33049
|
||||
> .@{input-prefix-cls} {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&::after {
|
||||
float: right;
|
||||
color: @text-color-secondary;
|
||||
white-space: nowrap;
|
||||
|
Loading…
Reference in New Issue
Block a user