diff options
Diffstat (limited to 'src/components/FormBuilder')
-rw-r--r-- | src/components/FormBuilder/index.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/components/FormBuilder/index.js b/src/components/FormBuilder/index.js index 8a13bf0..5636b32 100644 --- a/src/components/FormBuilder/index.js +++ b/src/components/FormBuilder/index.js @@ -97,7 +97,6 @@ function WidgetCard({ name, element, type, finalElement }) { function onDragStart(e) { e.dataTransfer.setData("application/formwidgettype", type); e.dataTransfer.effectAllowed = "copy"; - console.log(e); } const disabledFieldOverlay = { @@ -201,7 +200,6 @@ function DropZone({ insertField, index, moveField }) { e.stopPropagation(); e.preventDefault(); setDragOver(false); - console.log(e); if ([...e.dataTransfer.types].includes("application/formwidgettype")) { const type = e.dataTransfer.getData("application/formwidgettype"); insertField({ index, type }); @@ -233,10 +231,8 @@ function Form({ initialForm, editable }) { ...form, fields: form.fields.filter((field) => id !== field?.id), }; - console.log("deleteFormField", { id, form, newForm }); setForm({ ...newForm }); } - console.log("render", form.fields); function insertField({ index, type }) { const id = crypto.randomUUID(); @@ -249,14 +245,12 @@ function Form({ initialForm, editable }) { } function moveField(oldId, newIndex) { - console.log({ oldId, newIndex }); const oldIndex = form.fields.findIndex(({ id }) => id === oldId); const [oldFormField] = form.fields.splice(oldIndex, 1); if (oldIndex > newIndex) { newIndex++; } form.fields.splice(newIndex, 0, oldFormField); - console.log("newform", form); setForm({ ...form }); } |