From c90b1bc291cd9f42a2bfe862176d366f1f8c6443 Mon Sep 17 00:00:00 2001 From: Travis Jenkins Date: Wed, 12 Feb 2025 12:21:04 -0500 Subject: [PATCH] Clean up logs (#1465) Fix logic to default only when opening --- src/components/editor/Bindings/DeltaUpdates/index.tsx | 1 - .../materialization/SourceCapture/SelectCapture.tsx | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/editor/Bindings/DeltaUpdates/index.tsx b/src/components/editor/Bindings/DeltaUpdates/index.tsx index d3216853a..90fabe5d4 100644 --- a/src/components/editor/Bindings/DeltaUpdates/index.tsx +++ b/src/components/editor/Bindings/DeltaUpdates/index.tsx @@ -25,7 +25,6 @@ function DeltaUpdates() { checked={Boolean(deltaUpdates)} disabled={formActive} onChange={(event, checked) => { - console.log('checked', checked); setDeltaUpdates(checked); }} /> diff --git a/src/components/materialization/SourceCapture/SelectCapture.tsx b/src/components/materialization/SourceCapture/SelectCapture.tsx index 4df01d357..6c6b8e387 100644 --- a/src/components/materialization/SourceCapture/SelectCapture.tsx +++ b/src/components/materialization/SourceCapture/SelectCapture.tsx @@ -31,16 +31,19 @@ function SelectCapture() { const [open, setOpen] = useState(false); const toggleDialog = (args: any) => { + const opening = typeof args === 'boolean' ? args : !open; + // On create default settings when going to set the // source capture for the first time - if (!isEdit && !sourceCapture) { + // Make sure we ONLY do this when OPENING + if (!isEdit && !sourceCapture && opening) { setSourceCaptureDefinition({ capture: '', deltaUpdates: false, targetSchema: 'fromSourceName', }); } - setOpen(typeof args === 'boolean' ? args : !open); + setOpen(opening); }; const draftSpecs = useEditorStore_queryResponse_draftSpecs();