Skip to content

fix(files): prevent unrelated file deletions from wiping the active w…#81

Open
vibhutomer wants to merge 1 commit into
seetadev:mainfrom
vibhutomer:fix/delete-wipes-workspace
Open

fix(files): prevent unrelated file deletions from wiping the active w…#81
vibhutomer wants to merge 1 commit into
seetadev:mainfrom
vibhutomer:fix/delete-wipes-workspace

Conversation

@vibhutomer
Copy link
Copy Markdown

Fix: Prevent Unsaved Data Loss During File Management

Related Issue

Description of Changes

  • Modified the deletion handler within the IonAlert in Files.tsx.
  • Previously, deleting any file triggered loadDefault(), which erased the active spreadsheet.
  • Added a conditional wrapper if (currentKey === props.file) around the loadDefault() function.

Impact

  • Data Protection: Users can now safely delete old or unwanted files from their file manager while actively working on a different invoice without fear of their current screen being wiped.
  • Workflow Integrity: The workspace now correctly persists unless the user specifically deletes the exact file they are currently viewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Active Workspace Wiped When Deleting Unrelated Files

1 participant