mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 20:40:21 +02:00
Subsonic 2, general rework (#758)
This commit is contained in:
@@ -11,21 +11,24 @@ import { useListStoreActions, useListStoreByKey } from '/@/renderer/store';
|
||||
|
||||
export type UseDisplayRefreshProps = {
|
||||
gridRef: MutableRefObject<VirtualInfiniteGridRef | null>;
|
||||
itemCount?: number;
|
||||
tableRef: MutableRefObject<AgGridReactType | null>;
|
||||
} & UseHandleListFilterChangeProps;
|
||||
|
||||
export const useDisplayRefresh = ({
|
||||
export const useDisplayRefresh = <TFilter>({
|
||||
isClientSideSort,
|
||||
itemCount,
|
||||
gridRef,
|
||||
itemType,
|
||||
server,
|
||||
tableRef,
|
||||
}: UseDisplayRefreshProps) => {
|
||||
const { customFilters, pageKey, handlePlay } = useListContext();
|
||||
const { display, filter } = useListStoreByKey({ key: pageKey });
|
||||
const { display, filter } = useListStoreByKey<TFilter>({ key: pageKey });
|
||||
|
||||
const { handleRefreshGrid, handleRefreshTable } = useListFilterRefresh({
|
||||
isClientSideSort,
|
||||
itemCount,
|
||||
itemType,
|
||||
server,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user