Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with autoSize property in TextArea component #1210

Closed
kendo-bot opened this issue Feb 2, 2022 · 1 comment
Closed

Problems with autoSize property in TextArea component #1210

kendo-bot opened this issue Feb 2, 2022 · 1 comment
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

Comments

@kendo-bot
Copy link
Contributor

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

@simonssspirit simonssspirit added Bug Item which indicates that something is not working pkg:Inputs FP: Unplanned Label that indicates that this is a valid feature request or a bug report. and removed FP: Pending Review labels Feb 2, 2022
@kdikov82
Copy link
Contributor

Resolved in latest versions (tested with 5.11.0):
https://stackblitz.com/edit/react-gfknpe-tchaqx?file=app%2Fmain.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants