From 9d28591043741f08af34c5c45cc302e8898f572a Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 19 Feb 2024 11:24:24 -0600 Subject: [PATCH] force render scroller in history scroll list if not rendered --- .../src/components/History/HistoryScrollList.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/client/src/components/History/HistoryScrollList.vue b/client/src/components/History/HistoryScrollList.vue index c8a6b5a82d5b..71b5636fa469 100644 --- a/client/src/components/History/HistoryScrollList.vue +++ b/client/src/components/History/HistoryScrollList.vue @@ -80,6 +80,21 @@ onUnmounted(() => { useInfiniteScroll(scrollableDiv.value, () => {}); }); +/** if screen size is as such that a scroller is not rendered, + * we load enough histories so that a scroller is rendered + */ +watch( + () => isScrollable.value, + (scrollable: boolean) => { + if (!scrollable && !allLoaded.value) { + loadMore(); + } + }, + { + immediate: true, + } +); + watch( () => props.filter, async (newVal: string, oldVal: string) => {