diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md
index b79320a2..76b495e7 100644
--- a/COMPONENT_INDEX.md
+++ b/COMPONENT_INDEX.md
@@ -1626,7 +1626,7 @@ export interface HeaderSearchResult {
| Prop name | Kind | Reactive | Type | Default value | Description |
| :------------------ | :--------------- | :------- | :---------------------------------------- | ------------------ | -------------------------------------------------- |
-| selectedResultIndex | let
| Yes | number
| -1
| Specify the selected result index |
+| selectedResultIndex | let
| Yes | number
| 0
| Specify the selected result index |
| ref | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
| active | let
| Yes | boolean
| false
| Set to `true` to activate and focus the search bar |
| value | let
| Yes | string
| ""
| Specify the search input value |
@@ -1634,14 +1634,16 @@ export interface HeaderSearchResult {
### Slots
-| Slot name | Default | Props | Fallback |
-| :-------- | :------ | :---------------------------- | :------------------------------------------------------------------------------------------------------------ |
-| -- | Yes | { result: any }
| {result.text}
{#if result.description}<span>– {result.description}</span>{/if}
|
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------ |
+| -- | Yes | { result: HeaderSearchResult; index: number }
| {result.text}
{#if result.description}<span>– {result.description}</span>{/if}
|
### Events
| Event name | Type | Detail |
| :--------- | :--------- | :---------------------------------------------------------------------------------------------- |
+| active | dispatched | any
|
+| inactive | dispatched | any
|
| clear | dispatched | any
|
| select | dispatched | { value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }
|
| change | forwarded | -- |
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index c4349f58..4411396f 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -10307,7 +10307,7 @@
"kind": "let",
"description": "Specify the selected result index",
"type": "number",
- "value": "-1",
+ "value": "0",
"isFunction": false,
"constant": false,
"reactive": true
@@ -10318,10 +10318,12 @@
"name": "__default__",
"default": true,
"fallback": "{result.text}\n {#if result.description}– {result.description}{/if}",
- "slot_props": "{ result: any }"
+ "slot_props": "{ result: HeaderSearchResult; index: number }"
}
],
"events": [
+ { "type": "dispatched", "name": "active", "detail": "any" },
+ { "type": "dispatched", "name": "inactive", "detail": "any" },
{ "type": "dispatched", "name": "clear", "detail": "any" },
{
"type": "dispatched",
diff --git a/types/UIShell/HeaderSearch.d.ts b/types/UIShell/HeaderSearch.d.ts
index 5fbce3e6..a961d6d2 100644
--- a/types/UIShell/HeaderSearch.d.ts
+++ b/types/UIShell/HeaderSearch.d.ts
@@ -33,7 +33,7 @@ export interface HeaderSearchProps extends svelte.JSX.HTMLAttributes) => void): () => void;
+ $on(eventname: "inactive", cb: (event: CustomEvent) => void): () => void;
$on(eventname: "clear", cb: (event: CustomEvent) => void): () => void;
$on(
eventname: "select",