Skip to content

Commit

Permalink
Fix: Add sorting icon for draggable false
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Jan 25, 2022
1 parent f96b963 commit c791861
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/components/MTableHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,24 @@ export function MTableHeader({ onColumnResized, ...props }) {
)}
</Draggable>
);
} else if (columnDef.sorting !== false && props.sorting) {
content = (
<>
{columnDef.title}
<RenderSortButton
columnDef={columnDef}
orderBy={props.orderBy}
keepSortDirectionOnColumnSwitch={
props.keepSortDirectionOnColumnSwitch
}
orderDirection={props.orderDirection}
icon={props.icons.SortArrow}
thirdSortClick={props.thirdSortClick}
onOrderChange={props.onOrderChange}
/>
</>
);
}

if (columnDef.tooltip) {
content = (
<Tooltip title={columnDef.tooltip} placement="bottom">
Expand Down

0 comments on commit c791861

Please sign in to comment.