fix(client/kanban): fix kanban card default active all fields bug (#1270)
* fix(client/kanban): fix kanban card default active all fields bug * fix(client/kanban): fix when drag field also drag card bug
This commit is contained in:
parent
3e2a884a3e
commit
d875e0f372
@ -69,6 +69,9 @@ export const DndContext = observer((props: Props) => {
|
|||||||
const { active } = event;
|
const { active } = event;
|
||||||
const activeSchema = active?.data?.current?.schema;
|
const activeSchema = active?.data?.current?.schema;
|
||||||
setVisible(!!activeSchema);
|
setVisible(!!activeSchema);
|
||||||
|
if(props?.onDragStart){
|
||||||
|
props?.onDragStart?.(event);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onDragEnd={useDragEnd(props)}
|
onDragEnd={useDragEnd(props)}
|
||||||
>
|
>
|
||||||
|
@ -211,7 +211,7 @@ export const useFormItemInitializerFields = (options?: any) => {
|
|||||||
'x-read-pretty': field?.uiSchema?.['x-read-pretty'],
|
'x-read-pretty': field?.uiSchema?.['x-read-pretty'],
|
||||||
};
|
};
|
||||||
// interfaceConfig?.schemaInitialize?.(schema, { field, block: 'Form', readPretty: form.readPretty });
|
// interfaceConfig?.schemaInitialize?.(schema, { field, block: 'Form', readPretty: form.readPretty });
|
||||||
return {
|
const resultItem = {
|
||||||
type: 'item',
|
type: 'item',
|
||||||
title: field?.uiSchema?.title || field.name,
|
title: field?.uiSchema?.title || field.name,
|
||||||
component: 'CollectionFieldInitializer',
|
component: 'CollectionFieldInitializer',
|
||||||
@ -221,6 +221,14 @@ export const useFormItemInitializerFields = (options?: any) => {
|
|||||||
},
|
},
|
||||||
schema,
|
schema,
|
||||||
} as SchemaInitializerItemOptions;
|
} as SchemaInitializerItemOptions;
|
||||||
|
if (block == 'Kanban') {
|
||||||
|
resultItem['find'] = (schema: Schema, key: string, action: string) => {
|
||||||
|
const s = findSchema(schema,'x-component',block)
|
||||||
|
return findSchema(s, key, action);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultItem;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user