Duplicated
Last Updated: 02 Feb 2022 14:29 by ADMIN
Bartosz
Created on: 02 Feb 2022 13:06
Category: KendoReact
Type: Bug Report
0
Problems with autoSize property in TextArea component

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 on stack blitz

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
1 comment
ADMIN
Stefan
Posted on: 02 Feb 2022 14:29

Hello,

I will close it as a duplicate of:

https://feedback.telerik.com/kendo-react-ui/1552104-problems-with-autosize-property-in-textarea-component

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.