Skip to content

Commit fc95c04

Browse files
authored
fix: Cherry-pick deephaven#2540: Pass optional expandDescendants arg to setColumnExpanded (deephaven#2576)
Cherry-pick deephaven#2540: Pass optional expandDescendants arg to setColumnExpanded
1 parent 736064d commit fc95c04

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/iris-grid/src/IrisGrid.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,8 @@ class IrisGrid extends Component<IrisGridProps, IrisGridState> {
14981498
(mouseHandlers: MouseHandlersProp): readonly GridMouseHandler[] =>
14991499
[...mouseHandlers, ...this.mouseHandlers].map(handler =>
15001500
typeof handler === 'function' ? handler(this) : handler
1501-
)
1501+
),
1502+
{ max: 1 }
15021503
);
15031504

15041505
getCachedRenderer = memoize(
@@ -2531,11 +2532,18 @@ class IrisGrid extends Component<IrisGridProps, IrisGridState> {
25312532
});
25322533
}
25332534

2534-
toggleExpandColumn(modelIndex: ModelIndex): void {
2535+
toggleExpandColumn(
2536+
modelIndex: ModelIndex,
2537+
expandDescendants?: boolean
2538+
): void {
25352539
log.debug2('Toggle expand column', modelIndex);
25362540
const { model } = this.props;
25372541
if (isExpandableColumnGridModel(model) && model.hasExpandableColumns) {
2538-
model.setColumnExpanded(modelIndex, !model.isColumnExpanded(modelIndex));
2542+
model.setColumnExpanded(
2543+
modelIndex,
2544+
!model.isColumnExpanded(modelIndex),
2545+
expandDescendants
2546+
);
25392547
}
25402548
}
25412549

0 commit comments

Comments
 (0)