diff --git a/packages/core/src/data-editor/data-editor.tsx b/packages/core/src/data-editor/data-editor.tsx index 4736b1099..01165ffd2 100644 --- a/packages/core/src/data-editor/data-editor.tsx +++ b/packages/core/src/data-editor/data-editor.tsx @@ -101,6 +101,7 @@ export interface RowMarkerOptions { theme?: Partial; headerTheme?: Partial; headerAlwaysVisible?: boolean; + headerDisabled?: boolean; } interface MouseState { @@ -877,7 +878,7 @@ const DataEditorImpl: React.ForwardRefRenderFunction = (p, const [overFill, setOverFill] = React.useState(false); const [hCol, hRow] = hoveredItem ?? []; - const headerHovered = hCol !== undefined && hRow === -1; + const headerHovered = hCol !== undefined && hRow === -1 && columns[hCol].headerRowMarkerDisabled !== true; const groupHeaderHovered = hCol !== undefined && hRow === -2; let clickableInnerCellHovered = false; let editableBoolHovered = false; @@ -940,6 +940,7 @@ const DataGrid: React.ForwardRefRenderFunction = (p, : headerHovered || clickableInnerCellHovered || editableBoolHovered || groupHeaderHovered ? "pointer" : "default"; + console.log("CURSOR", cursor, cursorOverride, headerHovered); const style = React.useMemo( () => ({ // width, diff --git a/packages/core/src/internal/data-grid/render/data-grid-render.header.ts b/packages/core/src/internal/data-grid/render/data-grid-render.header.ts index 5828a4273..af7663548 100644 --- a/packages/core/src/internal/data-grid/render/data-grid-render.header.ts +++ b/packages/core/src/internal/data-grid/render/data-grid-render.header.ts @@ -77,7 +77,7 @@ export function drawGridHeaders( ctx.font = theme.baseFontFull; } const selected = selection.columns.hasIndex(c.sourceIndex); - const noHover = dragAndDropState !== undefined || isResizing; + const noHover = dragAndDropState !== undefined || isResizing || c.headerRowMarkerDisabled === true; const hoveredBoolean = !noHover && hRow === -1 && hCol === c.sourceIndex; const hover = noHover ? 0 diff --git a/setup-react-18-test.sh b/setup-react-18-test.sh index f68e8f92a..18bab1a5e 100755 --- a/setup-react-18-test.sh +++ b/setup-react-18-test.sh @@ -1,3 +1,3 @@ #!/bin/bash -npm i -D react@latest react-dom@latest @testing-library/react@latest @testing-library/react-hooks@latest @testing-library/user-event@14.5.1 react-test-renderer@latest \ No newline at end of file +npm i -D react@latest react-dom@latest @testing-library/react@latest @testing-library/react-hooks@latest @testing-library/user-event@14.5.1 react-test-renderer@latest @testing-library/dom \ No newline at end of file