Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lauri865 committed Dec 20, 2024
1 parent 2cbecee commit f5c4b24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const GridCellCheckboxForwardRef = React.forwardRef<HTMLInputElement, GridRender
const { isIndeterminate, isChecked } = useGridSelector(
apiRef,
checkboxPropsSelector,
undefined,
objectShallowCompare,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => {

let firstColumnToRender;
let lastColumnToRender;
const isPinnedPosition = params?.position !== undefined;
const isPinnedPosition =
params?.position === PinnedColumnPosition.LEFT ||
params?.position === PinnedColumnPosition.RIGHT;

if (!hasColumnVirtualization && !isPinnedPosition) {
firstColumnToRender = pinnedColumns.left.length;
lastColumnToRender = maxLastColumn - pinnedColumns.right.length;
lastColumnToRender = maxLastColumn;
} else {
firstColumnToRender = currentContext.firstColumnIndex;
lastColumnToRender = currentContext.lastColumnIndex;
Expand Down

0 comments on commit f5c4b24

Please sign in to comment.