Use nanoids when pasting or duplicating a table (#481)

This commit is contained in:
1ilit
2025-06-07 22:23:12 +04:00
committed by GitHub
parent ae388291db
commit 8bbe4da899

View File

@@ -609,7 +609,7 @@ export default function ControlPanel({
...copiedTable, ...copiedTable,
x: copiedTable.x + 20, x: copiedTable.x + 20,
y: copiedTable.y + 20, y: copiedTable.y + 20,
id: tables.length, id: nanoid(),
}); });
break; break;
} }
@@ -670,7 +670,7 @@ export default function ControlPanel({
...obj, ...obj,
x: obj.x + 20, x: obj.x + 20,
y: obj.y + 20, y: obj.y + 20,
id: tables.length, id: nanoid(),
}); });
} else if (v.validate(obj, areaSchema).valid) { } else if (v.validate(obj, areaSchema).valid) {
addArea({ addArea({