removeColumnsInRowGroupByColumn method
void
removeColumnsInRowGroupByColumn(
- List<PlutoColumn> columns, {
- bool notify = true,
})
inherited
Implementation
@override
@protected
void removeColumnsInRowGroupByColumn(
List<PlutoColumn> columns, {
bool notify = true,
}) {
if (columns.isEmpty || rowGroupDelegate?.type.isByColumn != true) {
return;
}
final delegate = rowGroupDelegate as PlutoRowGroupByColumnDelegate;
final Set<Key> removeKeys = Set.from(columns.map((e) => e.key));
isNotRemoved(e) => !removeKeys.contains(e.key);
final remaining =
delegate.columns.where(isNotRemoved).toList(growable: false);
if (remaining.length == delegate.columns.length) {
return;
}
delegate.columns.clear();
delegate.columns.addAll(remaining);
_updateRowGroup();
}