fix(table): pagesize
This commit is contained in:
@@ -8,6 +8,10 @@ import {
|
||||
SettingCustomPageSizeControl,
|
||||
usePersistentPageSizeOptions,
|
||||
} from "@/components/setting/PageSurface"
|
||||
import {
|
||||
getPersistedPageSizeOptions,
|
||||
resolvePageSizeWithinOptions,
|
||||
} from "@/components/setting/pageSize"
|
||||
import { Button, Group, Stack, Text } from "@mantine/core"
|
||||
import { DatePickerInput, type DatesRangeValue } from "@mantine/dates"
|
||||
|
||||
@@ -66,7 +70,13 @@ export default function PersonalProjectTable() {
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
const [page, setPage] = useState(1)
|
||||
const [pageSize, setPageSize] = useState(10)
|
||||
const [pageSize, setPageSize] = useState(() =>
|
||||
resolvePageSizeWithinOptions(
|
||||
10,
|
||||
getPersistedPageSizeOptions(DEFAULT_RECORDS_PER_PAGE_OPTIONS),
|
||||
10
|
||||
)
|
||||
)
|
||||
const {
|
||||
recordsPerPageOptions,
|
||||
addCustomPageSize,
|
||||
|
||||
Reference in New Issue
Block a user