updateRowGroupByHideColumn method

  1. @override
  2. @protected
void updateRowGroupByHideColumn(
  1. List<PlutoColumn> columns
)
inherited

Implementation

@override
@protected
void updateRowGroupByHideColumn(List<PlutoColumn> columns) {
  if (rowGroupDelegate?.type.isByColumn != true ||
      rowGroupDelegate?.showFirstExpandableIcon == true) {
    return;
  }

  final delegate = rowGroupDelegate as PlutoRowGroupByColumnDelegate;

  final Set<Key> updateKeys = Set.from(columns.map((e) => e.key));

  isUpdated(e) => updateKeys.contains(e.key);

  final updated = delegate.columns.firstWhereOrNull(isUpdated) != null;

  if (updated) {
    _updateRowGroup();
  }
}