fix(text-area): type value prop as nullable (#1933)

This commit is contained in:
Wolfgang Rathgeb 2024-08-09 14:55:30 +02:00 committed by GitHub
commit 47860ce1d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 6 deletions

View file

@ -4056,7 +4056,7 @@ None.
| Prop name | Required | Kind | Reactive | Type | Default value | Description | | Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :---------- | :------- | :--------------- | :------- | -------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | | :---------- | :------- | :--------------- | :------- | -------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- |
| 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>null &#124; 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>50</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 |

View file

@ -12466,8 +12466,8 @@
{ {
"name": "value", "name": "value",
"kind": "let", "kind": "let",
"description": "Specify the textarea value", "description": "Specify the textarea value.",
"type": "string", "type": "null | string",
"value": "\"\"", "value": "\"\"",
"isFunction": false, "isFunction": false,
"isFunctionDeclaration": false, "isFunctionDeclaration": false,

View file

@ -1,5 +1,8 @@
<script> <script>
/** Specify the textarea value */ /**
* Specify the textarea value.
* @type {null | string}
*/
export let value = ""; export let value = "";
/** Specify the placeholder text */ /** Specify the placeholder text */

View file

@ -5,10 +5,10 @@ type RestProps = SvelteHTMLElements["textarea"];
export interface TextAreaProps extends RestProps { export interface TextAreaProps extends RestProps {
/** /**
* Specify the textarea value * Specify the textarea value.
* @default "" * @default ""
*/ */
value?: string; value?: null | string;
/** /**
* Specify the placeholder text * Specify the placeholder text