Skip to content

Commit ad4205d

Browse files
authored
fix: DH-19393: clear aggregations in handleSelectDistinctChanged to prevent stale re… (#2442)
DH-19393: ensures that aggregations are cleared when applying selectDistinct from the table sidebar. - Introduced a call to `clearAllAggreations` inside `handleSelectDistinctchanged` to reset any existing aggregation state before applying selectDistinct
1 parent 75fe9c1 commit ad4205d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/iris-grid/src/IrisGrid.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,12 @@ class IrisGrid extends Component<IrisGridProps, IrisGridState> {
18201820
});
18211821
}
18221822

1823+
clearAllAggregations(): void {
1824+
log.debug('Clearing all aggregations');
1825+
1826+
this.setState({ aggregationSettings: DEFAULT_AGGREGATION_SETTINGS });
1827+
}
1828+
18231829
clearCrossColumSearch(): void {
18241830
log.debug('Clearing cross-column search');
18251831

@@ -3637,6 +3643,7 @@ class IrisGrid extends Component<IrisGridProps, IrisGridState> {
36373643

36383644
this.showAllColumns();
36393645
this.clearAllFilters();
3646+
this.clearAllAggregations();
36403647

36413648
this.startLoading(
36423649
`Selecting distinct values in ${

0 commit comments

Comments
 (0)