From e1e91bbe2055fec7041e1cd22ef9a0e05e104ee0 Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 7 Mar 2022 11:40:03 +0800 Subject: [PATCH] fix: enable drag and drop sorting --- .../src/schema-component/antd/table/Table.Void.Designer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/schema-component/antd/table/Table.Void.Designer.tsx b/packages/client/src/schema-component/antd/table/Table.Void.Designer.tsx index 964c2b351..3715c6031 100644 --- a/packages/client/src/schema-component/antd/table/Table.Void.Designer.tsx +++ b/packages/client/src/schema-component/antd/table/Table.Void.Designer.tsx @@ -1,5 +1,6 @@ import { ISchema, useField, useFieldSchema } from '@formily/react'; import React from 'react'; +import { useTranslation } from 'react-i18next'; import { useCollection, useResourceActionContext } from '../../../collection-manager'; import { useCollectionFilterOptions } from '../../../collection-manager/action-hooks'; import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings'; @@ -11,13 +12,14 @@ export const TableVoidDesigner = () => { const fieldSchema = useFieldSchema(); const dataSource = useCollectionFilterOptions(name); const ctx = useResourceActionContext(); + const { t } = useTranslation(); const { dn } = useDesignable(); const defaultFilter = fieldSchema?.['x-decorator-props']?.request?.params?.filter || {}; const defaultSort = fieldSchema?.['x-decorator-props']?.request?.params?.sort || []; return ( { field.decoratorProps.dragSort = dragSort;