File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
packages/react-renderer-demo/src/app/src/components Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,18 @@ const DocSearch = () => {
54
54
handleSelected : ( input , event , suggestion ) => {
55
55
event . button = 0 ;
56
56
const resultUrl = new URL ( suggestion . url ) ;
57
- push ( `${ resultUrl . pathname } ${ resultUrl . hash ? resultUrl . hash : '' } ` ) ;
57
+
58
+ let query = '' ;
59
+ if ( resultUrl . pathname . startsWith ( '/component-example/' ) ) {
60
+ [ 'mui' , 'pf4' , 'pf3' ] . find ( mapper => {
61
+ if ( resultUrl . hash . includes ( mapper ) ) {
62
+ query = `?mapper=${ mapper } ` ;
63
+ return true ;
64
+ }
65
+ } ) ;
66
+ }
67
+
68
+ push ( `${ resultUrl . pathname } ${ query } ${ resultUrl . hash ? resultUrl . hash : '' } ` ) ;
58
69
input . close ( ) ;
59
70
} ,
60
71
// debug: true, // Set debug to true if you want to inspect the dropdown.
You can’t perform that action at this time.
0 commit comments