### What problem does this PR solve? fix: fetch file list by react-query #1306 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -19,17 +19,19 @@ import {
|
||||
} from 'antd';
|
||||
import { useMemo } from 'react';
|
||||
import {
|
||||
useFetchDocumentListOnMount,
|
||||
useHandleBreadcrumbClick,
|
||||
useHandleDeleteFile,
|
||||
useHandleSearchChange,
|
||||
useSelectBreadcrumbItems,
|
||||
} from './hooks';
|
||||
|
||||
import { useSelectParentFolderList } from '@/hooks/file-manager-hooks';
|
||||
import {
|
||||
IListResult,
|
||||
useSelectParentFolderList,
|
||||
} from '@/hooks/file-manager-hooks';
|
||||
import styles from './index.less';
|
||||
|
||||
interface IProps {
|
||||
interface IProps
|
||||
extends Pick<IListResult, 'searchString' | 'handleInputChange'> {
|
||||
selectedRowKeys: string[];
|
||||
showFolderCreateModal: () => void;
|
||||
showFileUploadModal: () => void;
|
||||
@@ -41,10 +43,10 @@ const FileToolbar = ({
|
||||
showFolderCreateModal,
|
||||
showFileUploadModal,
|
||||
setSelectedRowKeys,
|
||||
searchString,
|
||||
handleInputChange,
|
||||
}: IProps) => {
|
||||
const { t } = useTranslate('knowledgeDetails');
|
||||
useFetchDocumentListOnMount();
|
||||
const { handleInputChange, searchString } = useHandleSearchChange();
|
||||
const breadcrumbItems = useSelectBreadcrumbItems();
|
||||
const { handleBreadcrumbClick } = useHandleBreadcrumbClick();
|
||||
const parentFolderList = useSelectParentFolderList();
|
||||
|
||||
Reference in New Issue
Block a user