Skip to content

fix(visual): visual doesnt reset after removing all inputs#228

Open
bimgeek wants to merge 5 commits intomainfrom
bilal/cnx-2114-3d-visual-doesnt-reset-after-removing-all-inputs
Open

fix(visual): visual doesnt reset after removing all inputs#228
bimgeek wants to merge 5 commits intomainfrom
bilal/cnx-2114-3d-visual-doesnt-reset-after-removing-all-inputs

Conversation

@bimgeek
Copy link
Contributor

@bimgeek bimgeek commented Feb 14, 2026

Fixes the issue where the 3D visual fails to reset when all input fields are removed.

Changes

1. Reset on Empty Input
Added a check in the update() method to detect when the root object ID is removed. When this occurs, the viewer state is now properly reset and returns early to prevent unnecessary processing.

if (!validationResult.rootObjectId) {
  console.log('🔄 Root object ID removed - resetting viewer state')
  this.resetViewerState()
  return
}

2. Code Refactoring
Extracted the duplicated 4-line reset sequence into a private resetViewerState() method. This was previously repeated in three locations (lines 151-155, 349-352, and the outer catch block).

3. Field Input Validation on Skip Paths
Added field input state validation during both postFileSaveSkip and postClickSkip paths. This ensures the field validation state stays synchronized even when update cycles are intentionally skipped, wrapped in try-catch to prevent failures from blocking the skip logic.

4. Error Handling
Replaced an empty catch block with proper error logging in the skip path validation.

Before

PBIDesktop_YquunhEpjs.mp4

After

PBIDesktop_nHEAVI4dMT.mp4

@linear
Copy link

linear bot commented Feb 14, 2026

@bimgeek bimgeek marked this pull request as ready for review February 14, 2026 16:52
@bimgeek bimgeek requested a review from oguzhankoral February 14, 2026 16:52
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.

1 participant