Skip to content

Commit

Permalink
Clean up logs (#1465)
Browse files Browse the repository at this point in the history
Fix logic to default only when opening
  • Loading branch information
travjenkins authored Feb 12, 2025
1 parent 1b1d6e0 commit c90b1bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/editor/Bindings/DeltaUpdates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function DeltaUpdates() {
checked={Boolean(deltaUpdates)}
disabled={formActive}
onChange={(event, checked) => {
console.log('checked', checked);
setDeltaUpdates(checked);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ function SelectCapture() {

const [open, setOpen] = useState<boolean>(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();
Expand Down

0 comments on commit c90b1bc

Please sign in to comment.