Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export function DataGrid<R, SR = unknown, K extends Key = Key>(props: DataGridPr
);

const headerSelectionValue = useMemo((): HeaderRowSelectionContextValue => {
// no rows to select = explicitely unchecked
// no rows to select = explicitly unchecked
let hasSelectedRow = false;
let hasUnselectedRow = false;

Expand Down Expand Up @@ -736,7 +736,7 @@ export function DataGrid<R, SR = unknown, K extends Key = Key>(props: DataGridPr
setDraggedOverRowIdx(overRowIdx);
const ariaRowIndex = headerAndTopSummaryRowsCount + overRowIdx + 1;
const el = gridEl.querySelector(
`:scope > [aria-rowindex="${ariaRowIndex}"] > [aria-colindex="${activePosition.idx + 1}"]`
`& > [aria-rowindex="${ariaRowIndex}"] > [aria-colindex="${activePosition.idx + 1}"]`
);
scrollIntoView(el);
}
Expand Down Expand Up @@ -1293,11 +1293,11 @@ export function DataGrid<R, SR = unknown, K extends Key = Key>(props: DataGridPr
}

function getRowToScroll(gridEl: HTMLDivElement) {
return gridEl.querySelector<HTMLDivElement>(':scope > [role="row"][tabindex="0"]');
return gridEl.querySelector<HTMLDivElement>('& > [role="row"][tabindex="0"]');
}

function getCellToScroll(gridEl: HTMLDivElement) {
return gridEl.querySelector<HTMLDivElement>(':scope > [role="row"] > [tabindex="0"]');
return gridEl.querySelector<HTMLDivElement>('& > [role="row"] > [tabindex="0"]');
}

function isSamePosition(p1: Position, p2: Position) {
Expand Down
6 changes: 3 additions & 3 deletions test/failOnConsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ beforeAll(() => {
};
});

afterEach(({ task, signal }) => {
afterEach(() => {
// Wait for the test and all `afterEach` hooks to complete to ensure all logs are caught
onTestFinished(() => {
onTestFinished(({ task, signal }) => {
// avoid failing test runs twice
if (task.result!.state !== 'fail' || signal.aborted) {
if (task.result!.state !== 'fail' && !signal.aborted) {
expect
.soft(
consoleErrorOrConsoleWarnWereCalled,
Expand Down