Skip to content

Commit

Permalink
Fix header click
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Feb 4, 2024
1 parent f13fd19 commit 780e9f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/internal/data-grid/data-grid.tsx
Expand Up @@ -984,12 +984,17 @@ const DataGrid: React.ForwardRefRenderFunction<DataGridRef, DataGridProps> = (p,
theme,
direction(header.title) === "rtl"
);
if (headerLayout.menuBounds !== undefined && pointInRect(headerLayout.menuBounds, clientX, clientY)) {
if (
header.hasMenu === true &&
headerLayout.menuBounds !== undefined &&
pointInRect(headerLayout.menuBounds, clientX, clientY)
) {
return {
area: "menu",
bounds: headerLayout.menuBounds,
};
} else if (
header.indicatorIcon !== undefined &&
headerLayout.indicatorIconBounds !== undefined &&
pointInRect(headerLayout.indicatorIconBounds, clientX, clientY)
) {
Expand Down

0 comments on commit 780e9f4

Please sign in to comment.