diff --git a/tools/est-test/native-actions.js b/tools/est-test/native-actions.js index 014d71236..0943f3bed 100644 --- a/tools/est-test/native-actions.js +++ b/tools/est-test/native-actions.js @@ -1,6 +1,7 @@ const EstActions = (() => { let pending = null, clipboard = [], + clipboardTable = "", restoring = false; const uid = () => globalThis.crypto.randomUUID(); function form(title, fields, callback) { @@ -158,9 +159,12 @@ const EstActions = (() => { for (let i = group.start; i < group.start + group.rows.length; i++) indices.add(i); clipboard = [...indices].sort((a, b) => a - b).map((i) => structuredClone(rows[i])); if (!clipboard.length) throw Error("복사할 행을 선택하세요."); + clipboardTable = state.view; if (name === "cut-row") deleteRows(); } else if (name === "paste-row") { if (!clipboard.length) throw Error("복사한 행이 없습니다."); + if (clipboardTable !== state.view) + throw Error("복사한 행과 같은 종류의 자료에 붙여넣으세요."); const rows = activeRows(); EstApp.change(() => { let at = (selected().at(-1) ?? rows.length - 1) + 1;