let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
-| expanded | No | let
| Yes | boolean
| false
| Set to `true` to expand the search bar |
-| value | No | let
| Yes | number | string
| ""
| Specify the value of the search input |
-| persistent | No | let
| No | boolean
| false
| Set to `true` to keep the search bar expanded |
-| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the search bar |
-| shouldFilterRows | No | let
| No | boolean | ((row: import("./DataTable.svelte").DataTableRow, value: number | string) => boolean)
| false
| Set to `true` to filter table rows using the search value.let
| No | string
| "0"
| Specify the tabindex |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
+| expanded | No | let
| Yes | boolean
| false
| Set to `true` to expand the search bar |
+| value | No | let
| Yes | number | string
| ""
| Specify the value of the search input |
+| persistent | No | let
| No | boolean
| false
| Set to `true` to keep the search bar expanded |
+| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the search bar |
+| placeholder | No | let
| No | string
| "Search..."
| Specify the `placeholder` attribute of the search input |
+| shouldFilterRows | No | let
| No | boolean | ((row: import("./DataTable.svelte").DataTableRow, value: number | string) => boolean)
| false
| Set to `true` to filter table rows using the search value.let
| No | string
| "0"
| Specify the tabindex |
### Slots
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index 975ca64b..00f2123c 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -13758,6 +13758,18 @@
"constant": false,
"reactive": false
},
+ {
+ "name": "placeholder",
+ "kind": "let",
+ "description": "Specify the `placeholder` attribute of the search input",
+ "type": "string",
+ "value": "\"Search...\"",
+ "isFunction": false,
+ "isFunctionDeclaration": false,
+ "isRequired": false,
+ "constant": false,
+ "reactive": false
+ },
{
"name": "shouldFilterRows",
"kind": "let",
diff --git a/types/DataTable/ToolbarSearch.svelte.d.ts b/types/DataTable/ToolbarSearch.svelte.d.ts
index 9ac80638..3aa20b24 100644
--- a/types/DataTable/ToolbarSearch.svelte.d.ts
+++ b/types/DataTable/ToolbarSearch.svelte.d.ts
@@ -27,6 +27,12 @@ export interface ToolbarSearchProps
*/
disabled?: boolean;
+ /**
+ * Specify the `placeholder` attribute of the search input
+ * @default "Search..."
+ */
+ placeholder?: string;
+
/**
* Set to `true` to filter table rows using the search value.
*