mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix(client): fix the issue where adding block templates in the popup does not display (#4531)
* chore: avoid crashing * fix(client): fix the issue where adding block templates in the popup does not display
This commit is contained in:
parent
d83c102492
commit
803ea80e4b
@ -230,7 +230,6 @@ const SortableRow = (props) => {
|
||||
? classObj.topActiveClass
|
||||
: classObj.bottomActiveClass;
|
||||
|
||||
console.log('active?.id !== id', active?.id, id, active?.id !== id);
|
||||
return (
|
||||
<tr
|
||||
ref={active?.id !== id ? setNodeRef : null}
|
||||
|
@ -65,6 +65,9 @@ interface RecursiveRemoveOptions {
|
||||
}
|
||||
|
||||
const generateUid = (s: ISchema) => {
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
if (!s['x-uid']) {
|
||||
s['x-uid'] = uid();
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ function useRecordBlocks() {
|
||||
if (fromOthersInPopup) {
|
||||
return templateWrapCollection(templateSchema, { item, fromOthersInPopup });
|
||||
}
|
||||
templateWrap(templateSchema, { item });
|
||||
return templateWrap(templateSchema, { item });
|
||||
},
|
||||
showAssociationFields: true,
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ export const gridRowColWrap = (schema: ISchema) => {
|
||||
type: 'void',
|
||||
'x-component': 'Grid.Col',
|
||||
properties: {
|
||||
[schema.name || uid()]: schema,
|
||||
[schema?.name || uid()]: schema,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -968,13 +968,14 @@ export const useCollectionDataSourceItems = ({
|
||||
// 目的是使点击无效
|
||||
onClick() {},
|
||||
componentProps: {
|
||||
...dataBlockInitializerProps,
|
||||
icon: null,
|
||||
title: otherText || t('Other records'),
|
||||
name: 'otherRecords',
|
||||
showAssociationFields: false,
|
||||
onlyCurrentDataSource: false,
|
||||
hideChildrenIfSingleCollection: false,
|
||||
onCreateBlockSchema: dataBlockInitializerProps.onCreateBlockSchema,
|
||||
fromOthersInPopup: true,
|
||||
componentType: componentTypeMap[componentName] || componentName,
|
||||
filter({ collection, associationField }) {
|
||||
if (filterOtherRecordsCollection) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user