@deephaven/iris-grid 0.85.34 → 0.85.35-alpha-pivots.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
11
11
  import { dhFilterFilled, vsRemove, vsCheck, vsFilter } from '@deephaven/icons';
12
12
  import debounce from 'lodash.debounce';
13
13
  import { ContextActions, ContextActionUtils, GLOBAL_SHORTCUTS } from '@deephaven/components';
14
- import { GridMouseHandler, GridRange, GridRenderer, GridSelectionMouseHandler, isDeletableGridModel, isEditableGridModel, isExpandableGridModel } from '@deephaven/grid';
14
+ import { GridMouseHandler, GridRange, GridRenderer, GridSelectionMouseHandler, isDeletableGridModel, isEditableGridModel, isExpandableColumnGridModel, isExpandableGridModel } from '@deephaven/grid';
15
15
  import { TableColumnFormatter, DateTimeColumnFormatter, TableUtils } from '@deephaven/jsapi-utils';
16
16
  import Log from '@deephaven/log';
17
17
  import { TextUtils, assertNotEmpty, assertNotNaN, assertNotNull, copyToClipboard } from '@deephaven/utils';
@@ -149,6 +149,26 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
149
149
  },
150
150
  disabled: !isColumnHidden
151
151
  });
152
+ if (isExpandableColumnGridModel(model) && model.hasExpandableColumns) {
153
+ if (model.isExpandAllColumnsAvailable) {
154
+ actions.push({
155
+ title: 'Expand All Columns',
156
+ group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,
157
+ order: 30,
158
+ action: () => {
159
+ this.irisGrid.expandAllColumns();
160
+ }
161
+ });
162
+ actions.push({
163
+ title: 'Collapse All Columns',
164
+ group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,
165
+ order: 40,
166
+ action: () => {
167
+ this.irisGrid.collapseAllColumns();
168
+ }
169
+ });
170
+ }
171
+ }
152
172
  actions.push({
153
173
  title: 'Quick Filters',
154
174
  icon: vsRemove,
@@ -158,7 +178,8 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
158
178
  order: 10,
159
179
  action: () => {
160
180
  this.irisGrid.toggleFilterBar(visibleIndex);
161
- }
181
+ },
182
+ disabled: !model.isFilterable(modelIndex)
162
183
  });
163
184
  actions.push({
164
185
  title: 'Advanced Filters',