Skip to content

Commit 3cba1ec

Browse files
authored
Update flexsearch depedency. (#195)
1 parent 4205743 commit 3cba1ec

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@radix-ui/react-switch": "^1.0.3",
8080
"@radix-ui/react-tabs": "^1.0.4",
8181
"@stitches/react": "^1.2.8",
82-
"flexsearch": "^0.7.11",
82+
"flexsearch": "^0.7.43",
8383
"hls.js": "^1.5.3",
8484
"node-webvtt": "^1.9.4",
8585
"openseadragon": "^2.4.2",

pnpm-lock.yaml

Lines changed: 2 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Scroll/Panel/Search/Results.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
Document as FlexSearchDocumentIndex,
3-
IndexOptionsForDocumentSearch,
4-
} from "flexsearch";
1+
import FlexSearch, { IndexOptionsForDocumentSearch } from "flexsearch";
52
import React, { useContext } from "react";
63
import {
74
StyledSearch,
@@ -34,7 +31,7 @@ const ScrollSearch: React.FC<ScrollSearchProps> = ({ isPanelExpanded }) => {
3431
const { state } = useContext(ScrollContext);
3532
const { annotations, searchString = "" } = state;
3633

37-
const index = new FlexSearchDocumentIndex(config);
34+
const index = new FlexSearch.Document(config);
3835
const indexIds: string[] = [];
3936
annotations?.forEach((annotation) => {
4037
annotation?.body?.forEach((body) => {

0 commit comments

Comments
 (0)