|
|
@@ -150,7 +150,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { emit } from '@nextcloud/event-bus' |
|
|
|
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus' |
|
|
|
import { minSearchLength, getTypes, search, defaultLimit, regexFilterIn, regexFilterNot, enableLiveSearch } from '../services/UnifiedSearchService' |
|
|
|
import { showError } from '@nextcloud/dialogs' |
|
|
|
|
|
|
@@ -329,10 +329,15 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async created() { |
|
|
|
subscribe('files:navigation:changed', this.resetForm) |
|
|
|
this.types = await getTypes() |
|
|
|
this.logger.debug('Unified Search initialized with the following providers', this.types) |
|
|
|
}, |
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
|
unsubscribe('files:navigation:changed', this.resetForm) |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
if (OCP.Accessibility.disableKeyboardShortcuts()) { |
|
|
|
return |
|
|
@@ -371,6 +376,10 @@ export default { |
|
|
|
emit('nextcloud:unified-search.close') |
|
|
|
}, |
|
|
|
|
|
|
|
resetForm() { |
|
|
|
this.$el.querySelector('form[role="search"]').reset() |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* Reset the search state |
|
|
|
*/ |