File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 309309 this . _changeUrl ( params . view , params . dir ) ;
310310 OC . Apps . hideAppSidebar ( $ ( '.detailsView' ) ) ;
311311 this . navigation . getActiveContainer ( ) . trigger ( new $ . Event ( 'urlChanged' , params ) ) ;
312+ window . _nc_event_bus . emit ( 'files:navigation:changed' )
312313 }
313314 } ,
314315
360361 this . navigation . getActiveContainer ( ) . trigger ( new $ . Event ( 'show' ) ) ;
361362 }
362363 this . navigation . getActiveContainer ( ) . trigger ( new $ . Event ( 'urlChanged' , params ) ) ;
364+ window . _nc_event_bus . emit ( 'files:navigation:changed' )
363365 } ,
364366
365367 /**
Original file line number Diff line number Diff line change @@ -300,10 +300,15 @@ export default {
300300 },
301301
302302 async created () {
303+ subscribe (' files:navigation:changed' , this .resetForm )
303304 this .types = await getTypes ()
304305 this .logger .debug (' Unified Search initialized with the following providers' , this .types )
305306 },
306307
308+ beforeDestroy () {
309+ unsubscribe (' files:navigation:changed' , this .resetForm )
310+ },
311+
307312 mounted () {
308313 document .addEventListener (' keydown' , (event ) => {
309314 // if not already opened, allows us to trigger default browser on second keydown
@@ -338,6 +343,10 @@ export default {
338343 emit (' nextcloud:unified-search.close' )
339344 },
340345
346+ resetForm () {
347+ this .$el .querySelector (' form[role="search"]' ).reset ()
348+ },
349+
341350 /**
342351 * Reset the search state
343352 */
You can’t perform that action at this time.
0 commit comments