Clear filter states in onDeactivated() instead of onActivated() to ber fresh on view

This commit is contained in:
Johannes Zellner
2025-09-30 10:24:58 +02:00
parent 249734f52a
commit 55cd323159
2 changed files with 8 additions and 11 deletions
+3 -3
View File
@@ -179,9 +179,6 @@ function setItemWidth() {
}
onActivated(async () => {
search.value = '';
category.value = '';
setItemWidth();
await getAppList();
@@ -196,6 +193,9 @@ onActivated(async () => {
});
onDeactivated(() => {
search.value = '';
category.value = '';
window.removeEventListener('hashchange', onHashChange);
window.removeEventListener('resize', setItemWidth);
});