Skip to content

Commit

Permalink
force render scroller in history scroll list if not rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Feb 19, 2024
1 parent e5ee4a2 commit 9d28591
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/src/components/History/HistoryScrollList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 9d28591

Please sign in to comment.