From a587a75ea49305c3a80cdd9ea71820ae73556323 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 16 Jun 2022 17:10:38 +0200 Subject: [PATCH] Build docs --- COMPONENT_INDEX.md | 19 ++++++++++--------- docs/src/COMPONENT_API.json | 12 ++++++++++++ types/DataTable/ToolbarSearch.svelte.d.ts | 6 ++++++ 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 29cee82b..aedb9dc4 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -4488,15 +4488,16 @@ None. ### Props -| 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 | -| 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.

If `true`, the default search excludes `id`, `cells` fields and
only does a basic comparison on string and number type cell values.

To implement your own client-side filtering, pass a function
that accepts a row and value and returns a boolean. | -| tabindex | No | 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.

If `true`, the default search excludes `id`, `cells` fields and
only does a basic comparison on string and number type cell values.

To implement your own client-side filtering, pass a function
that accepts a row and value and returns a boolean. | +| tabindex | No | 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. *