File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -79,12 +79,13 @@ $(document).ready(function() {
7979 } )
8080 . addClass ( 'external' ) ;
8181
82- docsearch ( {
82+ let search = docsearch ( {
8383 container : '#docsearch' ,
8484 appId : '2DNYOU6YJZ' ,
8585 apiKey : '21ce3e522455e18e7ee16cf7d66edb4b' ,
8686 indexName : 'ezplatform' ,
8787 inputSelector : '#search_input' ,
88+ autocompleteOptions : { debug : false } ,
8889 transformData : function ( hits ) {
8990 const hitsPerPage = 10 ;
9091 const removedPattern = '¶' ;
@@ -127,6 +128,15 @@ $(document).ready(function() {
127128 } ,
128129 debug : false ,
129130 } ) ;
131+ search . autocomplete . on ( 'autocomplete:updated' , event => {
132+ $ ( '.ds-dropdown-menu .ds-suggestion' ) . each ( function ( ) {
133+ let category = $ ( this ) . find ( '.algolia-docsearch-suggestion--subcategory-column' ) ;
134+ let content = $ ( this ) . find ( '.algolia-docsearch-suggestion--title' ) ;
135+ if ( content . text ( ) . trim ( ) == category . text ( ) . trim ( ) ) {
136+ content . remove ( ) ;
137+ }
138+ } ) ;
139+ } ) ;
130140
131141 $ ( document ) . on ( 'keydown keypress' , 'form.md-search__form' , function ( event ) {
132142 if ( event . keyCode == 13 ) {
You can’t perform that action at this time.
0 commit comments