mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 14:26:58 +00:00
:up Adding disable autoscroll
This commit is contained in:
parent
39dc37dda3
commit
ca873202c0
@ -1,5 +1,5 @@
|
|||||||
import { useVirtualizer } from '@tanstack/react-virtual';
|
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 { Base } from './Base';
|
||||||
import { UseMountEffect } from '../hooks';
|
import { UseMountEffect } from '../hooks';
|
||||||
|
|
||||||
@ -50,7 +50,9 @@ export const InfiniteScroll: FC<InfiniteScrollProps> = props =>
|
|||||||
|
|
||||||
UseMountEffect(() =>
|
UseMountEffect(() =>
|
||||||
{
|
{
|
||||||
setTimeout(() => scrollToIndex(scrollIndex), 0)
|
if (scrollToBottom) {
|
||||||
|
setTimeout(() => scrollToIndex(scrollIndex), 0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
@ -90,4 +92,4 @@ export const InfiniteScroll: FC<InfiniteScrollProps> = props =>
|
|||||||
style={ { minHeight: `${ paddingBottom }px` } } /> }
|
style={ { minHeight: `${ paddingBottom }px` } } /> }
|
||||||
</Base>
|
</Base>
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -189,7 +189,8 @@ export const ChooserWidgetView: FC<ChooserWidgetViewProps> = props =>
|
|||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
} }
|
} }
|
||||||
|
scrollToBottom={ false }
|
||||||
/>
|
/>
|
||||||
{ pickallFurni && (
|
{ pickallFurni && (
|
||||||
<Button
|
<Button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user