mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: By default, 50 records are displayed per page. #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -85,6 +85,6 @@ export const useSetPaginationParams = () => {
|
||||
return {
|
||||
setPaginationParams,
|
||||
page: Number(queryParameters.get('page')) || 1,
|
||||
size: Number(queryParameters.get('size')) || 10,
|
||||
size: Number(queryParameters.get('size')) || 50,
|
||||
};
|
||||
};
|
||||
|
||||
@ -85,7 +85,7 @@ interface SearchListResponse {
|
||||
export const useFetchSearchList = (params?: SearchListParams) => {
|
||||
const [searchParams, setSearchParams] = useState<SearchListParams>({
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
page_size: 50,
|
||||
...params,
|
||||
});
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@ import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
||||
import searchService from '@/services/search-service';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { pick } from 'lodash';
|
||||
import { Plus, Search } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
@ -146,7 +145,8 @@ export default function SearchList() {
|
||||
{list?.data.total && list?.data.total > 0 && (
|
||||
<div className="px-8 mb-4">
|
||||
<RAGFlowPagination
|
||||
{...pick(searchParams, 'current', 'pageSize')}
|
||||
current={searchParams.page}
|
||||
pageSize={searchParams.page_size}
|
||||
total={list?.data.total}
|
||||
onChange={handlePageChange}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user