Skip to content

Commit

Permalink
fix: search issue with mock context
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 23, 2020
1 parent bf3a68b commit 3604a8f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/blocks/src/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export const Search = () => {
}
const searchResults = lunrRef.current.search(search);
const newItems: Pages = searchResults
.slice(0, 10)
.slice(0, 20)
.filter(
(item: { ref: string }) =>
storeProvider.getStoryDoc(item.ref) as StoriesDoc,
)
.map((item: { ref: string }) => {
const page = storeProvider.getStoryDoc(item.ref) as StoriesDoc;
return { ...page, id: page.title };
Expand Down

0 comments on commit 3604a8f

Please sign in to comment.