fix: clear resize indicator and reset state on data update #4120#5082
Open
Erica-cod wants to merge 3 commits intoVisActor:developfrom
Open
fix: clear resize indicator and reset state on data update #4120#5082Erica-cod wants to merge 3 commits intoVisActor:developfrom
Erica-cod wants to merge 3 commits intoVisActor:developfrom
Conversation
…e indicators VisActor#4120 When setRecords() or updateOption() is called during an active resize operation, call updateOptionSetState() to fully reset interaction state, hide resize column/row indicators, and prevent the table from being stuck in grabing mode. Added demo case for verification. Made-with: Cursor
Made-with: Cursor
… setRecords Instead of calling the heavy updateOptionSetState() from setRecords(), extract a focused endResizeIfResizing() method that only handles resize indicator cleanup. _updateOptionSetState() reuses it internally. Made-with: Cursor
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.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
close #4120
💡 Background and solution
When a user is dragging to resize a column/row, if external code calls
setRecords()orupdateOption()at the same time, the resize indicator line gets stuck on the table and the table becomes unresponsive (stuck ingrabinginteraction state).Root cause:
_updateOptionSetState()resetscolumnResize/rowResizestate objects but never callshideResizeCol()/hideResizeRow()to remove the visual indicator. After the reset, thepointeruphandler seesresizing === falseand skipsendResizeCol(), leaving the indicator line visible and the interaction state stuck.Solution:
endResizeIfResizing()method toStateManager— a focused method that hides resize indicators, resets theresizingflag, and restoresinteractionStatefromgrabingtodefault._updateOptionSetState()now callsendResizeIfResizing()internally, soupdateOption()also benefits.setRecords()inListTable,PivotTable, andPivotChartcallsendResizeIfResizing()directly — a minimal, targeted cleanup without the full state reset ofupdateOptionSetState().Demo: Added
resize-setRecordsexample under "交互" category with buttons to triggersetRecords()andupdateOption()during resize operations.📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough