#141 - Added callback when indexing is done

This commit is contained in:
Simon Cambier
2023-02-11 16:52:33 +01:00
parent 8c78c91cc3
commit c1d82dab54
3 changed files with 34 additions and 8 deletions

View File

@@ -74,9 +74,13 @@ object `omnisearch` (`window.omnisearch`)
```ts
// API:
{
type OmnisearchApi = {
// Returns a promise that will contain the same results as the Vault modal
search: (query: string) => Promise<ResultNoteApi[]>
search: (query: string) => Promise<ResultNoteApi[]>,
// Register a callback that will be called when the indexing is done
registerOnIndexed: (callback: () => void) => void,
// Unregister a callback that was previously registered
unregisterOnIndexed: (callback: () => void) => void,
}
type ResultNoteApi = {