Skip to content

Commit

Permalink
fix: also use column.groupTitle (#761)
Browse files Browse the repository at this point in the history
check if column.groupTitle is set as a function and use it
  • Loading branch information
DavidLemayian authored May 1, 2023
1 parent 611bcab commit 2534c55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/MTableGroupRow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ function MTableGroupRow(props) {
let title = column.title;
if (typeof options.groupTitle === 'function') {
title = options.groupTitle(props.groupData);
} else if (typeof column.groupTitle === 'function') {
title = column.groupTitle(props.groupData);
} else if (typeof title !== 'string') {
title = React.cloneElement(title);
}
Expand Down

0 comments on commit 2534c55

Please sign in to comment.