fix(visual): visual doesnt reset after removing all inputs#228
Open
fix(visual): visual doesnt reset after removing all inputs#228
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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
postFileSaveSkipandpostClickSkippaths. 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