File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
studio/src/pages/[organizationSlug]/[namespace]/graph/[slug] Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ const SubGraphsPage: NextPageWithLayout = () => {
41
41
if ( tab === "featureSubgraphs" ) {
42
42
const fuse = new Fuse ( graphData . featureSubgraphs , {
43
43
keys : [ "name" ] ,
44
- minMatchCharLength : 1 ,
44
+ useExtendedSearch : true ,
45
45
} ) ;
46
46
47
47
const searchedFetaureSubgraphs = search
48
- ? fuse . search ( search ) . map ( ( { item } ) => item )
48
+ ? fuse . search ( `' ${ search } ` ) . map ( ( { item } ) => item )
49
49
: graphData . featureSubgraphs ;
50
50
51
51
setTotalCount ( searchedFetaureSubgraphs . length ) ;
@@ -55,11 +55,12 @@ const SubGraphsPage: NextPageWithLayout = () => {
55
55
} else {
56
56
const fuse = new Fuse ( graphData . subgraphs , {
57
57
keys : [ "name" , "id" ] ,
58
- minMatchCharLength : 1 ,
58
+ useExtendedSearch : true ,
59
59
} ) ;
60
60
61
+ // https://www.fusejs.io/examples.html#default-weight:~:text=%23-,Extended%20Search,-This%20form%20of
61
62
const searchedSubgraphs = search
62
- ? fuse . search ( search ) . map ( ( { item } ) => item )
63
+ ? fuse . search ( `' ${ search } ` ) . map ( ( { item } ) => item )
63
64
: graphData . subgraphs ;
64
65
65
66
setTotalCount ( searchedSubgraphs . length ) ;
You can’t perform that action at this time.
0 commit comments