From 4f630a5f72e45467d8979e1a464132ab09362d73 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 14 Dec 2022 08:17:07 +0100 Subject: [PATCH] MOBILE-4081 database: Fix app restarted when resetting search --- .../mod/data/components/index/addon-mod-data-index.html | 6 +++--- src/addons/mod/data/components/index/index.ts | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/addons/mod/data/components/index/addon-mod-data-index.html b/src/addons/mod/data/components/index/addon-mod-data-index.html index e18e931ad..f168a9d2f 100644 --- a/src/addons/mod/data/components/index/addon-mod-data-index.html +++ b/src/addons/mod/data/components/index/addon-mod-data-index.html @@ -62,14 +62,14 @@ - + {{ 'addon.mod_data.resetsettings' | translate}} - +

@@ -105,7 +105,7 @@ - + diff --git a/src/addons/mod/data/components/index/index.ts b/src/addons/mod/data/components/index/index.ts index 1feb291b2..894ca5296 100644 --- a/src/addons/mod/data/components/index/index.ts +++ b/src/addons/mod/data/components/index/index.ts @@ -426,8 +426,13 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp /** * Reset all search filters and closes the modal. + * + * @param ev Event. */ - searchReset(): void { + searchReset(ev: Event): void { + ev.preventDefault(); + ev.stopPropagation(); + this.search.sortBy = '0'; this.search.sortDirection = 'DESC'; this.search.text = '';