mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-07-18 10:11:24 +00:00
Use nanoids when pasting or duplicating a table (#481)
This commit is contained in:
@@ -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({
|
||||||
|
Reference in New Issue
Block a user