Skip to content

Commit 6da7e66

Browse files
skjnldsvnextcloud-command
authored andcommitted
fix(search): fix load more
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 parent 5ea5e7b commit 6da7e66

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

apps/files/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@
324324
this.setActiveView(params.view, {silent: true});
325325
if (lastId !== this.getActiveView()) {
326326
this.getCurrentAppContainer().trigger(new $.Event('show', params));
327+
window._nc_event_bus.emit('files:navigation:changed')
327328
}
328329

329330
this.getCurrentAppContainer().trigger(new $.Event('urlChanged', params));
330-
window._nc_event_bus.emit('files:navigation:changed')
331331

332332
},
333333

core/src/views/UnifiedSearch.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
? t('core', 'Loading more results …')
136136
: t('core', 'Load more results')"
137137
:icon-class="loading[type] ? 'icon-loading-small' : ''"
138-
@click.stop="loadMore(type)"
138+
@click.prevent.stop="loadMore(type)"
139139
@focus="setFocusedIndex" />
140140
</li>
141141
</ul>
@@ -351,13 +351,13 @@ export default {
351351
},
352352
353353
async created() {
354-
subscribe('files:navigation:changed', this.resetForm)
354+
subscribe('files:navigation:changed', this.onNavigationChange)
355355
this.types = await getTypes()
356356
this.logger.debug('Unified Search initialized with the following providers', this.types)
357357
},
358358
359359
beforeDestroy() {
360-
unsubscribe('files:navigation:changed', this.resetForm)
360+
unsubscribe('files:navigation:changed', this.onNavigationChange)
361361
},
362362
363363
mounted() {
@@ -396,7 +396,7 @@ export default {
396396
emit('nextcloud:unified-search.close')
397397
},
398398
399-
resetForm() {
399+
onNavigationChange() {
400400
this.$el.querySelector('form[role="search"]').reset()
401401
},
402402

dist/core-unified-search.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-unified-search.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)