mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-11 10:05:07 +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 =
|
// = Children Component =
|
||||||
// ================================================================
|
// ================================================================
|
||||||
.@{form-item-prefix-cls} {
|
.@{form-item-prefix-cls} {
|
||||||
.@{ant-prefix}-mentions,
|
|
||||||
textarea.@{ant-prefix}-input {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
// input[type=file]
|
// input[type=file]
|
||||||
.@{ant-prefix}-upload {
|
.@{ant-prefix}-upload {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
@ -3332,6 +3332,7 @@ exports[`renders ./components/input/demo/textarea-show-count.md correctly 1`] =
|
|||||||
<div
|
<div
|
||||||
class="ant-input-textarea ant-input-textarea-show-count"
|
class="ant-input-textarea ant-input-textarea-show-count"
|
||||||
data-count="0 / 100"
|
data-count="0 / 100"
|
||||||
|
style="height:120px"
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
class="ant-input"
|
class="ant-input"
|
||||||
|
@ -22,5 +22,8 @@ const onChange = e => {
|
|||||||
console.log('Change:', e.target.value);
|
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 {
|
&-textarea-show-count {
|
||||||
&-show-count::after {
|
// https://github.com/ant-design/ant-design/issues/33049
|
||||||
|
> .@{input-prefix-cls} {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
float: right;
|
float: right;
|
||||||
color: @text-color-secondary;
|
color: @text-color-secondary;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
Loading…
Reference in New Issue
Block a user