From 8bbe4da899be08ccc32c0609b8418b2bc6fd4a97 Mon Sep 17 00:00:00 2001 From: 1ilit <1ilit@proton.me> Date: Sat, 7 Jun 2025 22:23:12 +0400 Subject: [PATCH] Use nanoids when pasting or duplicating a table (#481) --- src/components/EditorHeader/ControlPanel.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/EditorHeader/ControlPanel.jsx b/src/components/EditorHeader/ControlPanel.jsx index 729c14c..dfb920b 100644 --- a/src/components/EditorHeader/ControlPanel.jsx +++ b/src/components/EditorHeader/ControlPanel.jsx @@ -609,7 +609,7 @@ export default function ControlPanel({ ...copiedTable, x: copiedTable.x + 20, y: copiedTable.y + 20, - id: tables.length, + id: nanoid(), }); break; } @@ -670,7 +670,7 @@ export default function ControlPanel({ ...obj, x: obj.x + 20, y: obj.y + 20, - id: tables.length, + id: nanoid(), }); } else if (v.validate(obj, areaSchema).valid) { addArea({