fix: invalid drag and drop sort
This commit is contained in:
parent
9ff82f9998
commit
13248af671
@ -19,6 +19,7 @@ export interface CollectionOptions {
|
||||
title?: string;
|
||||
filterTargetKey?: string;
|
||||
targetKey?: string;
|
||||
sortable?: any;
|
||||
fields?: FieldOptions[];
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ import { useSchemaTemplate } from '../../../schema-templates';
|
||||
import { useDesignable } from '../../hooks';
|
||||
|
||||
export const TableBlockDesigner = () => {
|
||||
const { name, title } = useCollection();
|
||||
const { name, title, sortable } = useCollection();
|
||||
const field = useField();
|
||||
const fieldSchema = useFieldSchema();
|
||||
const dataSource = useCollectionFilterOptions(name);
|
||||
@ -41,7 +41,7 @@ export const TableBlockDesigner = () => {
|
||||
onChange={(dragSort) => {
|
||||
field.decoratorProps.dragSort = dragSort;
|
||||
fieldSchema['x-decorator-props'].dragSort = dragSort;
|
||||
service.run({ ...service.params?.[0], sort: defaultSort });
|
||||
service.run({ ...service.params?.[0], sort: 'sort' });
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
['x-uid']: fieldSchema['x-uid'],
|
||||
|
@ -39,7 +39,7 @@ export const TableVoidDesigner = () => {
|
||||
onChange={(dragSort) => {
|
||||
field.decoratorProps.dragSort = dragSort;
|
||||
fieldSchema['x-decorator-props'].dragSort = dragSort;
|
||||
ctx.run({ ...ctx.params?.[0], sort: defaultSort });
|
||||
ctx.run({ ...ctx.params?.[0], sort: 'sort' });
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
['x-uid']: fieldSchema['x-uid'],
|
||||
|
Loading…
Reference in New Issue
Block a user