Skip to content

Commit

Permalink
Merge pull request #1135 from interval/io-search-initial-results-async
Browse files Browse the repository at this point in the history
Fetch initial `io.search` results asynchronously if not given
  • Loading branch information
jacobmischka authored Mar 15, 2023
2 parents c949f42 + b9a7570 commit c3b5125
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/examples/basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ const interval = new Interval({
const [r1, r2] = await io.group([
io.search('One', {
onSearch: async query => fakeDb.find(query),
initialResults: await fakeDb.find('jo'),
renderResult: result => ({
label: `${result.first_name} ${result.last_name}`,
}),
Expand Down

0 comments on commit c3b5125

Please sign in to comment.