Completed
Last Updated: 21 Oct 2024 07:24 by ADMIN
Krystian
Created on: 02 Feb 2022 12:42
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

1 comment
ADMIN
Stefan
Posted on: 02 Feb 2022 14:28

Hello,

Thank you for reporting this.

I have logged this for fixing, and the status can be monitored here as well:

https://github.com/telerik/kendo-react/issues/1210

Currently, there is no workaround available, if one is found it will be added to the issue.

Additionally, I have added some Telerik points to your account for bringing this to our attention.

Apologies for the inconvenience this may have caused you.

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.