svelte-algolia
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -11,3 +11,3 @@ { | ||
"license": "MIT", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"type": "module", | ||
@@ -14,0 +14,0 @@ "svelte": "src/Search.svelte", |
@@ -174,3 +174,3 @@ <p align="center"> | ||
| `searchKey` | `String!` | [Search-only API key](https://algolia.com/doc/guides/security/api-keys/#search-only-api-key) | | ||
| `indices` | `{indexName: Component}` | Object mapping the name of each index the `Search` component should tap into for finding Search results to the Svelte component that should render those hits. | | ||
| `indices` | `{indexName: Component, ...}` | Object mapping the name of each index the `Search` component should tap into for finding Search results to the Svelte component that should render those hits. | | ||
| `loadingStr` | `'Searching...'` | String to display in the results pane while Search results are being fetched. | | ||
@@ -185,3 +185,3 @@ | `noResultMsg` | ``(query) => `No results for '${query}'` `` | Function that returns the string to display when search returned no results. | | ||
`Search.svelte` listens for `on:close` events on every hit component it renders and will set `hasFocus` to `false` to close itself when received. You can use this e.g. to close the search interface when the user clicks on a link in one of the search results and navigates to a different page on your site: | ||
`Search.svelte` listens for **`on:close`** events on every hit component it renders and will set `hasFocus` to `false` to close itself when received. You can use this e.g. to close the search interface when the user clicks on a link in one of the search results and navigates to a different page on your site: | ||
@@ -203,2 +203,8 @@ ```svelte | ||
It also emits a **`focus`** event every the user clicks the search icon and focus enters the text input. | ||
```svelte | ||
<Search on:focus={() => console.log("Let's search!")} /> | ||
``` | ||
### Styling | ||
@@ -205,0 +211,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110775
265