Problems with autoSize property in TextArea component #1210
Labels
Bug
Item which indicates that something is not working
FP: Unplanned
Label that indicates that this is a valid feature request or a bug report.
pkg:Inputs
Issue #1
Given:
Controlled TextaArea componenet with autoSize and rows properties.
const App = () => {
const [state, setState] = useState();
return (
<TextArea
value={state}
onChange={(e) => setState(e.value)}
autoSize={true}
rows={2}
/>
);
};
When:
Add couple text lines to extend TextArea size and remove these empty lines in any way
Then:
Content from TextArea field is removed but TextArea height stays the same, doesn't come back to it's initial value. It's different comparing to example from your docs where example contains uncontrolled component.
Issue #2
Given:
Controlled TextaArea componenet with autoSize and rows properties.
const App = () => {
const [state, setState] = useState();
return (
<TextArea
value={state}
onChange={(e) => setState(e.value)}
autoSize={true}
rows={4}
/>
);
};
and styles like these
.k-textarea textarea {
border: 1px solid blue;
}
When:
Start typing anything
Then:
Height of textarea component is decreasing
Example https://stackblitz.com/edit/react-gfknpe-qkdadt?file=app%2Fmain.tsx
The text was updated successfully, but these errors were encountered: