fix: Simple Pivot prerequisites#2437
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues related to simple pivot prerequisites by resetting movedColumns on TABLE_CHANGED events, recalculating grid metrics based on updated state, and disabling advanced filters for non-filterable columns while also exposing the DisplayColumn type export.
- Updated context menu actions to disable advanced filtering on non-filterable columns.
- Added TABLE_CHANGED event listener in IrisGrid to reset movedColumns on table updates.
- Refactored state updates in Grid to batch changes and update metrics accordingly.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx | Added a disabled property based on model.isFilterable to the context menu action. |
| packages/iris-grid/src/index.ts | Added a wildcard export from IrisGridModel to expose additional members. |
| packages/iris-grid/src/IrisGrid.tsx | Bound and registered a new handleTableChanged event handler for TABLE_CHANGED events. |
| packages/grid/src/Grid.tsx | Refactored state update calls to batch state changes before updating metrics. |
Comments suppressed due to low confidence (2)
packages/iris-grid/src/index.ts:15
- The wildcard export may inadvertently expose internal members. Consider verifying that this export is intentional and does not lead to naming collisions or leaking implementation details.
export * from './IrisGridModel';
packages/grid/src/Grid.tsx:611
- [nitpick] Batching state updates and passing the updated state to updateMetrics is a good optimization; please double-check that the state used in updateMetrics accurately reflects all intended changes before the canvas is re-rendered.
this.setState(updatedState);
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2437 +/- ##
========================================
Coverage 47.23% 47.23%
========================================
Files 718 718
Lines 39594 39603 +9
Branches 10098 9909 -189
========================================
+ Hits 18701 18706 +5
- Misses 20882 20886 +4
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@vbabich Might need to update snapshots... for some reason I can't download the playwright report right now. |
Co-authored-by: Mike Bender <mikebender@deephaven.io>
movedColumnsinIrisGridand re-calculate metrics onTABLE_CHANGEDeventGrid.componentDidUpdateDisplayColumntype exportCOLUMNS_CHANGEDinstead ofTABLE_CHANGEDinupdateFrozenColumns