diff --git a/src/common/InfiniteScroll.tsx b/src/common/InfiniteScroll.tsx index 7a05c09..5f401bd 100644 --- a/src/common/InfiniteScroll.tsx +++ b/src/common/InfiniteScroll.tsx @@ -1,5 +1,5 @@ import { useVirtualizer } from '@tanstack/react-virtual'; -import { FC, Fragment, ReactElement, useEffect, useRef, useState } from 'react'; +import { FC, Fragment, ReactElement, useEffect, useRef } from 'react'; import { Base } from './Base'; import { UseMountEffect } from '../hooks'; @@ -50,7 +50,9 @@ export const InfiniteScroll: FC = props => UseMountEffect(() => { - setTimeout(() => scrollToIndex(scrollIndex), 0) + if (scrollToBottom) { + setTimeout(() => scrollToIndex(scrollIndex), 0); + } }); useEffect(() => @@ -90,4 +92,4 @@ export const InfiniteScroll: FC = props => style={ { minHeight: `${ paddingBottom }px` } } /> } ); -} +} \ No newline at end of file diff --git a/src/components/room/widgets/choosers/ChooserWidgetView.tsx b/src/components/room/widgets/choosers/ChooserWidgetView.tsx index 67c04cc..f11e63d 100644 --- a/src/components/room/widgets/choosers/ChooserWidgetView.tsx +++ b/src/components/room/widgets/choosers/ChooserWidgetView.tsx @@ -189,7 +189,8 @@ export const ChooserWidgetView: FC = props => ); - } } + } } + scrollToBottom={ false } /> { pickallFurni && (