fix(plugin-map): map block repeats (#1582)
* fix: map block repeats * feat: update logic
This commit is contained in:
parent
f9b034b283
commit
471b319b86
@ -18,12 +18,14 @@ export const MapBlockOptions: React.FC = (props) => {
|
|||||||
const schemaInitializer = useContext(SchemaInitializerContext);
|
const schemaInitializer = useContext(SchemaInitializerContext);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
children.push({
|
if (!children.find((item) => item.component === 'MapBlockInitializer')) {
|
||||||
key: 'mapBlock',
|
children.push({
|
||||||
type: 'item',
|
key: 'mapBlock',
|
||||||
title: generateNTemplate('Map'),
|
type: 'item',
|
||||||
component: 'MapBlockInitializer',
|
title: generateNTemplate('Map'),
|
||||||
});
|
component: 'MapBlockInitializer',
|
||||||
|
});
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user