[Bug]: textarea cols not working as expected
See original GitHub issuePackage
Browser
No response
Package version
latest
React version
latest
Description
When adjusting the cols
in <TextArea>
nothing is changing. I would expect the width of the <TextArea>
to shrink or grow depending on the number set to cols
.
rows
works as expected.
when removing the min-width
and width: 100%
then the <TextArea>
adjusts as expected
Suggested Severity
Severity 4 = Unrelated to a user task, has a workaround or does not need a workaround.
Reproduction/example
https://codesandbox.io/s/vigorous-knuth-vsff4p?file=/src/App.js
Steps to reproduce
Go to the example and try changing the number of cols
.
Then try adjusting the styles like mentioned above and see how it then does shrink/grow
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
DCA: rows and cols doesn't work as expected for textarea ...
It seems that rows and cols keys for textarea in evaluation array doesn't work as expected. For example, I have this code in...
Read more >Is a textarea's cols attribute supposed to indicate 1 less than ...
As a rule, you should not worry too much about this. Set the cols attribute according to what you expect to be most...
Read more >33654 - TEXTAREA incorrectly applying ROWS= and COLS ...
TEXTAREA incorrectly applying ROWS= and COLS= (horizontal / vertical scrollbar extra space, with overlay scrollbars disabled)
Read more >7 - How do I control the number of cols in a textarea?
According to the Form API, you control the number of columns in a textarea with the #cols attribute. However, setting this seems to...
Read more >HTML textarea tag - W3Schools
The size of a text area is specified by the cols and rows attributes (or with ... Specifies a short hint that describes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ariellalgilmore Yes I believe that is the design spec
@tay1orjones I would imagine it’s just to conform with other form elements that they expand to fill their container. We could probably update this to be an inline style and not apply the inline style if the
col
prop is passed down.