mantine
mantine copied to clipboard
Textarea with autosize shows scrollbar when the text still fit the `maxRow`
What package has an issue
@mantine/core
Describe the bug
Video demonstrating the bug:
https://user-images.githubusercontent.com/19225266/190802117-af029dc3-dc78-4dc5-91fa-779c889919a6.mp4
I'm not even using maxRows
and the scrollbar still shows after I paste a big text, or programmatically update the field value with a big text.
What version of @mantine/hooks page do you have in package.json?
5.3.2
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/mantine-textarea-autosize-issue-4yn0gz?file=/src/App.tsx
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No
Textarea is built with react-textarea-autosize package, this issue is not fixable on our side, you can report the issue in https://github.com/Andarist/react-textarea-autosize repository.
I've used the same package on previous personal UI libraries, and MUI also uses it and I've never seen this issue.
Can you reopen the issue? I'll work on it then, because I'm 100% sure this is on Mantine's side.
Hey Vitaly, I moved out of Mantine for personal reasons, so I won't be working on this issue anymore. I'm sorry man.
setting styles: { input: { overflow: "hidden" } }
was the quick fix for us to remove the unwarranted Textarea scroll behavior.
In my case I had to set the overflow on textarea:
sx={{textarea: {overflow: 'hidden'}}}