fix( importable-field): incorrect display when moving sort handle (#1613)

* fix: importable-field incorrect display when moving sort

* fix: cascader

---------

Co-authored-by: chenos <chenlinxh@gmail.com>
This commit is contained in:
katherinehhh 2023-03-29 00:12:39 +08:00 committed by GitHub
parent de4beb57a0
commit 22498d8fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import { useCollection } from '@nocobase/client'; import { Cascader, useCollection } from '@nocobase/client';
import { useFields } from './useFields'; import { useFields } from './useFields';
export const useShared = () => { export const useShared = () => {
@ -38,7 +38,7 @@ export const useShared = () => {
dataIndex: { dataIndex: {
type: 'array', type: 'array',
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-component': 'Cascader', 'x-component': Cascader,
required: true, required: true,
enum: fields, enum: fields,
'x-component-props': { 'x-component-props': {

View File

@ -1,6 +1,6 @@
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import type { VoidField } from '@formily/core'; import type { VoidField } from '@formily/core';
import { useCollection } from '@nocobase/client'; import { useCollection, Cascader } from '@nocobase/client';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { NAMESPACE } from './constants'; import { NAMESPACE } from './constants';
import { useFields } from './useFields'; import { useFields } from './useFields';
@ -52,7 +52,7 @@ export const useShared = () => {
dataIndex: { dataIndex: {
type: 'array', type: 'array',
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-component': 'Cascader', 'x-component': Cascader,
required: true, required: true,
enum: fields, enum: fields,
'x-component-props': { 'x-component-props': {
@ -61,7 +61,6 @@ export const useShared = () => {
value: 'name', value: 'name',
children: 'children', children: 'children',
}, },
// labelInValue: true,
changeOnSelect: false, changeOnSelect: false,
}, },
}, },