mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-19 10:07:24 +00:00
Collection tag (#2266)
* feat: collection metadata filter (#2211) * feat: add dataset collection tags (#2231) * dataset page * workflow page * move * fix * add plus filter * fix * fix * fix * perf: collection tag code * fix: collection tags (#2249) * fix * fix * fix tags of dataset page * fix tags of workflow page * doc * add comments * fix: collection tags (#2264) * fix: metadata filter * feat: search filter --------- Co-authored-by: heheer <1239331448@qq.com> Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
useBoolean,
|
||||
useLockFn,
|
||||
useMemoizedFn,
|
||||
useMount,
|
||||
useScroll,
|
||||
useVirtualList,
|
||||
useRequest
|
||||
@@ -50,6 +49,7 @@ export function useScrollPagination<
|
||||
const { toast } = useToast();
|
||||
const [current, setCurrent] = useState(1);
|
||||
const [data, setData] = useState<TData['list']>([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [isLoading, { setTrue, setFalse }] = useBoolean(false);
|
||||
|
||||
const [list] = useVirtualList<TData['list'][0]>(data, {
|
||||
@@ -71,6 +71,7 @@ export function useScrollPagination<
|
||||
...defaultParams
|
||||
} as TParams);
|
||||
|
||||
setTotal(res.total);
|
||||
setCurrent(num);
|
||||
|
||||
if (num === 1) {
|
||||
@@ -146,6 +147,7 @@ export function useScrollPagination<
|
||||
return {
|
||||
containerRef,
|
||||
list,
|
||||
total,
|
||||
data,
|
||||
setData,
|
||||
isLoading,
|
||||
|
Reference in New Issue
Block a user