BFormTextarea should allow 1 row
See original GitHub issueIn this commit, the default value for the rows
prop of the BFormTextarea component was changed to ‘2’, which is good. However it now ignores a prop value of ‘1’, which was previously possible - the computedMinRows
computed property forces a value of at least 2.
This makes it impossible to have a BFormTextarea display one row if the contents has 0 or 1 rows, and grow from there as the user enters text. Could the minimum rows please be decreased to 1?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Form Textarea | Components - BootstrapVue
Create multi-line text inputs with support for auto height sizing, minimum and maximum number of rows, and contextual validation states.
Read more >Form Textarea | BootstrapVue 3 - cdmoro
Form Textarea. Create multi-line text inputs with support for auto height sizing, minimum and maximum number of rows, and contextual states.
Read more >VueJs Form textarea and text formatting issue using ...
I'm using BootstrapVue to build a row with two columns. The first column has a text and the second column has a b-form-textarea...
Read more >The Textarea element - HTML: HyperText Markup Language
This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in...
Read more >HTML textarea rows Attribute - W3Schools
The rows attribute specifies the visible height of a text area, in lines. Note: The size of a textarea can also be specified...
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
I came up with a CSS solution.
Or, when I want a textarea to show up as one line by default, but grow when focused, I use a static css class:
Unfortunately 1 is not a valid value for rows across browsers. Certain versions of firefox will crap out when set to 1, and other browsers will force it to 2 (el.rows === 2) even though you have set it to 1.
The minimum value of 2 is on purpose to work cross browser. Allowing other values may crap out on some browsers.