Skip to content

Commit ee3dcfa

Browse files
committed
chore: v11 TextArea
`cols` no longer has a defaults to 50 but remains at 100% width by default.
1 parent 8c182af commit ee3dcfa

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

COMPONENT_INDEX.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4027,7 +4027,7 @@ None.
40274027
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLTextAreaElement</code> | <code>null</code> | Obtain a reference to the textarea HTML element |
40284028
| value | No | <code>let</code> | Yes | <code>string</code> | <code>""</code> | Specify the textarea value |
40294029
| placeholder | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the placeholder text |
4030-
| cols | No | <code>let</code> | No | <code>number</code> | <code>50</code> | Specify the number of cols |
4030+
| cols | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the number of cols |
40314031
| rows | No | <code>let</code> | No | <code>number</code> | <code>4</code> | Specify the number of rows |
40324032
| maxCount | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the max character count |
40334033
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |

docs/src/COMPONENT_API.json

-1
Original file line numberDiff line numberDiff line change
@@ -12290,7 +12290,6 @@
1229012290
"kind": "let",
1229112291
"description": "Specify the number of cols",
1229212292
"type": "number",
12293-
"value": "50",
1229412293
"isFunction": false,
1229512294
"isFunctionDeclaration": false,
1229612295
"isRequired": false,

src/TextArea/TextArea.svelte

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
/** Specify the placeholder text */
66
export let placeholder = "";
77
8-
/** Specify the number of cols */
9-
export let cols = 50;
8+
/**
9+
* Specify the number of cols
10+
* @type {number}
11+
* */
12+
export let cols = undefined;
1013
1114
/** Specify the number of rows */
1215
export let rows = 4;
@@ -109,6 +112,7 @@
109112
class:bx--text-area--light="{light}"
110113
class:bx--text-area--invalid="{invalid}"
111114
maxlength="{maxCount ?? undefined}"
115+
style="{cols ? '' : 'width: 100%;'}"
112116
{...$$restProps}
113117
on:change
114118
on:input

types/TextArea/TextArea.svelte.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface TextAreaProps
1717

1818
/**
1919
* Specify the number of cols
20-
* @default 50
20+
* @default undefined
2121
*/
2222
cols?: number;
2323

0 commit comments

Comments
 (0)