Skip to content

Commit fce4725

Browse files
mozzerbobPhil MorrisKevinVandy
authored
fix(table-core): column getCanGroup always resolving to true (#4843)
* Fix getCanGroup always resolving to true * fix column.getCanGroup --------- Co-authored-by: Phil Morris <[email protected]> Co-authored-by: Kevin Van Cott <[email protected]>
1 parent c6b2507 commit fce4725

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/table-core/src/features/ColumnGrouping.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,9 @@ export const ColumnGrouping: TableFeature = {
283283

284284
column.getCanGroup = () => {
285285
return (
286-
column.columnDef.enableGrouping ??
287-
true ??
288-
table.options.enableGrouping ??
289-
true ??
290-
!!column.accessorFn
286+
(column.columnDef.enableGrouping ?? true) &&
287+
(table.options.enableGrouping ?? true) &&
288+
(!!column.accessorFn || !!column.columnDef.getGroupingValue)
291289
)
292290
}
293291

0 commit comments

Comments
 (0)