From 3fe13d523545dbcf0dfcf6e2430291b99d82b00e Mon Sep 17 00:00:00 2001 From: Pujit Mehrotra Date: Wed, 20 Nov 2024 12:17:17 -0500 Subject: [PATCH] fix(web): reset infinite scroll when notification filters change --- web/components/Notifications/List.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/components/Notifications/List.vue b/web/components/Notifications/List.vue index 8a839b02d..f559ffc4b 100644 --- a/web/components/Notifications/List.vue +++ b/web/components/Notifications/List.vue @@ -21,7 +21,13 @@ const props = withDefaults( } ); +/** whether we should continue trying to load more notifications */ const canLoadMore = ref(true); +/** reset custom state when props (e.g. props.type filter) change*/ +watch(props, () => { + canLoadMore.value = true; +}); + const { result, error, fetchMore } = useQuery(getNotifications, () => ({ filter: { offset: 0,