Skip to content

Commit

Permalink
native event stored instead of synthtic event
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharyar-shamshi committed Feb 20, 2024
1 parent d14c3d0 commit 2f3b2ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export const useGridColumnResize = (
const logger = useGridLogger(apiRef, 'useGridColumnResize');

const colDefRef = React.useRef<GridStateColDef>();
const previousMouseClickEvent = React.useRef<Event>();
const previousMouseClickEvent = React.useRef<MouseEvent>();
const columnHeaderElementRef = React.useRef<HTMLDivElement>();
const headerFilterElementRef = React.useRef<HTMLDivElement>();
const groupHeaderElementsRef = React.useRef<Element[]>([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('<DataGridPro /> - Columns', () => {
/>,
);
const separator = document.querySelector(`.${gridClasses['columnSeparator--resizable']}`)!;
fireEvent.mouseDown(separator, new MouseEvent('mouseDown', { clientX: 100 }));
fireEvent.mouseDown(separator, new MouseEvent('mousedown', { clientX: 100 }));
fireEvent.mouseMove(separator, new MouseEvent('mousemove', { clientX: 110, buttons: 1 }));
fireEvent.mouseUp(separator, new MouseEvent('mouseup'));
expect(getColumnHeaderCell(0)).toHaveInlineStyle({ width: '110px' });
Expand Down

0 comments on commit 2f3b2ea

Please sign in to comment.