chore: v11 TextArea

`cols` no longer has a defaults to 50 but remains at 100% width by default.
This commit is contained in:
Gregor Wassmann 2023-03-31 19:45:57 +02:00 committed by Enrico Sacchetti
commit 2ca2833945
No known key found for this signature in database
GPG key ID: 3374B89ECA60D796
4 changed files with 8 additions and 5 deletions

View file

@ -4048,7 +4048,7 @@ None.
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLTextAreaElement</code> | <code>null</code> | Obtain a reference to the textarea HTML element | | ref | No | <code>let</code> | Yes | <code>null &#124; HTMLTextAreaElement</code> | <code>null</code> | Obtain a reference to the textarea HTML element |
| value | No | <code>let</code> | Yes | <code>string</code> | <code>""</code> | Specify the textarea value | | value | No | <code>let</code> | Yes | <code>string</code> | <code>""</code> | Specify the textarea value |
| placeholder | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the placeholder text | | placeholder | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the placeholder text |
| cols | No | <code>let</code> | No | <code>number</code> | <code>50</code> | Specify the number of cols | | cols | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the number of cols |
| rows | No | <code>let</code> | No | <code>number</code> | <code>4</code> | Specify the number of rows | | rows | No | <code>let</code> | No | <code>number</code> | <code>4</code> | Specify the number of rows |
| maxCount | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the max character count | | maxCount | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the max character count |
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant | | light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |

View file

@ -12454,7 +12454,6 @@
"kind": "let", "kind": "let",
"description": "Specify the number of cols", "description": "Specify the number of cols",
"type": "number", "type": "number",
"value": "50",
"isFunction": false, "isFunction": false,
"isFunctionDeclaration": false, "isFunctionDeclaration": false,
"isRequired": false, "isRequired": false,

View file

@ -5,8 +5,11 @@
/** Specify the placeholder text */ /** Specify the placeholder text */
export let placeholder = ""; export let placeholder = "";
/** Specify the number of cols */ /**
export let cols = 50; * Specify the number of cols
* @type {number}
* */
export let cols = undefined;
/** Specify the number of rows */ /** Specify the number of rows */
export let rows = 4; export let rows = 4;
@ -110,6 +113,7 @@
class:bx--text-area--light="{light}" class:bx--text-area--light="{light}"
class:bx--text-area--invalid="{invalid}" class:bx--text-area--invalid="{invalid}"
maxlength="{maxCount ?? undefined}" maxlength="{maxCount ?? undefined}"
style="{cols ? '' : 'width: 100%;'}"
{...$$restProps} {...$$restProps}
on:change on:change
on:input on:input

View file

@ -18,7 +18,7 @@ export interface TextAreaProps extends RestProps {
/** /**
* Specify the number of cols * Specify the number of cols
* @default 50 * @default undefined
*/ */
cols?: number; cols?: number;