From 47860ce1d7cc5f3b0363ab619dcfd74b3276eda7 Mon Sep 17 00:00:00 2001 From: Wolfgang Rathgeb Date: Fri, 9 Aug 2024 14:55:30 +0200 Subject: [PATCH] fix(text-area): type `value` prop as nullable (#1933) --- COMPONENT_INDEX.md | 2 +- docs/src/COMPONENT_API.json | 4 ++-- src/TextArea/TextArea.svelte | 5 ++++- types/TextArea/TextArea.svelte.d.ts | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index a328325e..f8836948 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -4056,7 +4056,7 @@ None. | Prop name | Required | Kind | Reactive | Type | Default value | Description | | :---------- | :------- | :--------------- | :------- | -------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | | ref | No | let | Yes | null | HTMLTextAreaElement | null | Obtain a reference to the textarea HTML element | -| value | No | let | Yes | string | "" | Specify the textarea value | +| value | No | let | Yes | null | string | "" | Specify the textarea value. | | placeholder | No | let | No | string | "" | Specify the placeholder text | | cols | No | let | No | number | 50 | Specify the number of cols | | rows | No | let | No | number | 4 | Specify the number of rows | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index bded7736..488bd906 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -12466,8 +12466,8 @@ { "name": "value", "kind": "let", - "description": "Specify the textarea value", - "type": "string", + "description": "Specify the textarea value.", + "type": "null | string", "value": "\"\"", "isFunction": false, "isFunctionDeclaration": false, diff --git a/src/TextArea/TextArea.svelte b/src/TextArea/TextArea.svelte index 0e395931..98a73a33 100644 --- a/src/TextArea/TextArea.svelte +++ b/src/TextArea/TextArea.svelte @@ -1,5 +1,8 @@