Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperengstrom committed Dec 17, 2024
1 parent f533cdf commit d2c8e64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/supersearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ To use `supersearch` in a non-Svelte project ...
| `resultItem` | `Snippet<[ResultItem]>` | A [Snippet](https://svelte.dev/docs/svelte/snippet) used for customized rendering of result items. | `undefined` |
| `debouncedWait` | `number` | The wait time, in milliseconds that debounce function should wait between invocated search queries. | `300` |

&nbsp;
Supersearch also exports a `lxlQualifierPlugin` that can be used (passed to the extensions prop) if you want atomic, stylable, removable, labeled pills from some key-value pairs in your editor. This requires:

- Your language exporting `Qualifier` nodes consisting of `QualifierKey`, `QualifierOperator` and `QualifierValue` (i.e `key:value`).
- Your pass a function of type `GetLabelFunction`, returning labels to be displayed and an optional remove link.

## Developing

Install dependencies with `npm install` and start a development server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type Qualifier = {
operator: string;
};

type GetLabelFunction = (
export type GetLabelFunction = (
key: string,
value?: string
) => {
Expand Down

0 comments on commit d2c8e64

Please sign in to comment.