wip fix
This commit is contained in:
parent
c2c68a8a32
commit
6d31ffdd66
|
|
@ -139,7 +139,18 @@ export const EdSidePropComp: FC<{ meta: IMeta }> = ({ meta }) => {
|
||||||
const indexes: (number | undefined)[] = [];
|
const indexes: (number | undefined)[] = [];
|
||||||
mprops.forEach((e) => indexes.push(e.get("idx")));
|
mprops.forEach((e) => indexes.push(e.get("idx")));
|
||||||
let idx: any = (indexes.sort().pop() || 0) + 1;
|
let idx: any = (indexes.sort().pop() || 0) + 1;
|
||||||
const name = `prop_${indexes.length === 0 ? 1 : idx + 1}`;
|
if (indexes.length === 0) {
|
||||||
|
idx = 1;
|
||||||
|
} else {
|
||||||
|
idx = parseInt(idx) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
let name = `prop_${idx}`;
|
||||||
|
while (mprops.get(name)) {
|
||||||
|
idx = parseInt(idx) + 1;
|
||||||
|
name = `prop_${idx}`;
|
||||||
|
}
|
||||||
|
|
||||||
const map = new Y.Map() as FMCompDef;
|
const map = new Y.Map() as FMCompDef;
|
||||||
syncronize(map, {
|
syncronize(map, {
|
||||||
idx: idx,
|
idx: idx,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue