mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
fix ai proxy logs pagination (#3954)
* fix ai proxy logs pagination * delete unused code
This commit is contained in:
@@ -214,6 +214,11 @@ export function useScrollPagination<
|
||||
async (init = false, ScrollContainerRef?: RefObject<HTMLDivElement>) => {
|
||||
if (noMore && !init) return;
|
||||
|
||||
if (init) {
|
||||
setData([]);
|
||||
setTotal(0);
|
||||
}
|
||||
|
||||
const offset = init ? 0 : data.length;
|
||||
|
||||
setTrue();
|
||||
@@ -288,7 +293,7 @@ export function useScrollPagination<
|
||||
// Watch scroll position
|
||||
useThrottleEffect(
|
||||
() => {
|
||||
if (!ref?.current || noMore) return;
|
||||
if (!ref?.current || noMore || isLoading || data.length === 0) return;
|
||||
const { scrollTop, scrollHeight, clientHeight } = ref.current;
|
||||
|
||||
if (
|
||||
|
Reference in New Issue
Block a user