mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 06:59:26 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
cd4b071831
@ -78,13 +78,11 @@ export const useTableBlockProps = () => {
|
|||||||
),
|
),
|
||||||
onChange: useCallback(
|
onChange: useCallback(
|
||||||
({ current, pageSize }, filters, sorter) => {
|
({ current, pageSize }, filters, sorter) => {
|
||||||
const sort = !ctx.dragSort
|
const sort = sorter.order
|
||||||
? sorter.order
|
? sorter.order === `ascend`
|
||||||
? sorter.order === `ascend`
|
? [sorter.field]
|
||||||
? [sorter.field]
|
: [`-${sorter.field}`]
|
||||||
: [`-${sorter.field}`]
|
: globalSort || ctx.dragSortBy;
|
||||||
: globalSort || ctx.dragSortBy
|
|
||||||
: ctx.dragSortBy;
|
|
||||||
const currentPageSize = pageSize || fieldSchema.parent?.['x-decorator-props']?.['params']?.pageSize;
|
const currentPageSize = pageSize || fieldSchema.parent?.['x-decorator-props']?.['params']?.pageSize;
|
||||||
const args = { ...params?.[0], page: current || 1, pageSize: currentPageSize };
|
const args = { ...params?.[0], page: current || 1, pageSize: currentPageSize };
|
||||||
if (sort) {
|
if (sort) {
|
||||||
@ -92,7 +90,7 @@ export const useTableBlockProps = () => {
|
|||||||
}
|
}
|
||||||
ctx.service.run(args);
|
ctx.service.run(args);
|
||||||
},
|
},
|
||||||
[globalSort, params],
|
[globalSort, params, ctx.dragSort],
|
||||||
),
|
),
|
||||||
onClickRow: useCallback(
|
onClickRow: useCallback(
|
||||||
(record, setSelectedRow, selectedRow) => {
|
(record, setSelectedRow, selectedRow) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user