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}
/>
);
};
Add couple text lines to extend TextArea size and remove these empty lines in any way.
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.
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;
}
Start typing anything
Height of textarea component is decreasing