mirror of
https://github.com/unraid/api.git
synced 2026-01-14 12:39:53 -06:00
fix(web): reset infinite scroll when notification filters change
This commit is contained in:
@@ -21,7 +21,13 @@ const props = withDefaults(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** whether we should continue trying to load more notifications */
|
||||||
const canLoadMore = ref(true);
|
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, () => ({
|
const { result, error, fetchMore } = useQuery(getNotifications, () => ({
|
||||||
filter: {
|
filter: {
|
||||||
offset: 0,
|
offset: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user