Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] Use event.defaultMuiPrevented to prevent the default behavior #2179

Merged
merged 9 commits into from
Jul 28, 2021
56 changes: 28 additions & 28 deletions docs/pages/api-docs/data-grid/data-grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,40 +53,40 @@ import { DataGrid } from '@material-ui/data-grid';
| <span class="prop-name">logger</span> | <span class="prop-type">Logger</span> | null | Pass a custom logger in the components that implements the 'Logger' interface. |
| <span class="prop-name">logLevel</span> | <span class="prop-type">string \| false</span> | false | Allows to pass the logging level or false to turn off logging. |
| <span class="prop-name">nonce</span> | <span class="prop-type">string</span> | | Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute). |
| <span class="prop-name">onCellBlur</span> | <span class="prop-type">(params: GridCellParams, event: React.FocusEvent) => void</span> | | Callback fired when the active element leaves a cell. |
| <span class="prop-name">onCellClick</span> | <span class="prop-type">(params: GridCellParams, event: React.MouseEvent) => void</span> | | Callback fired when a click event comes from a cell element. |
| <span class="prop-name">onCellDoubleClick</span> | <span class="prop-type">(params: GridCellParams, event: React.MouseEvent) => void</span> | | Callback fired when a double click event comes from a cell element. |
| <span class="prop-name">onCellBlur</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.FocusEvent>) => void</span> | | Callback fired when the active element leaves a cell. |
| <span class="prop-name">onCellClick</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a click event comes from a cell element. |
| <span class="prop-name">onCellDoubleClick</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a double click event comes from a cell element. |
| <span class="prop-name">onCellFocusOut</span> | <span class="prop-type">(params: GridCellParams, event?: MuiEvent<MouseEvent>) => void</span> | | Callback fired when a cell loses focus. |
| <span class="prop-name">onCellKeyDown</span> | <span class="prop-type">(params: GridCellParams, event: React.KeyboardEvent) => void</span> | | Callback fired when a keydown event comes from a cell element. |
| <span class="prop-name">onCellOver</span> | <span class="prop-type">(params: GridCellParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse over event comes from a cell element. |
| <span class="prop-name">onCellOut</span> | <span class="prop-type">(params: GridCellParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse out comes from a cell element. |
| <span class="prop-name">onCellEnter</span> | <span class="prop-type">(params: GridCellParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse enter event comes from a cell element. |
| <span class="prop-name">onCellLeave</span> | <span class="prop-type">(params: GridCellParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse leave event comes from a cell element. |
| <span class="prop-name">onCellModeChange</span> | <span class="prop-type">(params: GridCellModeChangeParams) => void | | Callback fired when the cell mode changed. |
| <span class="prop-name">onColumnHeaderClick</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: React.MouseEvent) => void</span> | | Callback fired when a click event comes from a column header element. |
| <span class="prop-name">onColumnHeaderDoubleClick</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: React.MouseEvent) => void</span> | | Callback fired when a double click event comes from a column header element. |
| <span class="prop-name">onColumnHeaderOver</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouseover event comes from a column header element. |
| <span class="prop-name">onColumnHeaderOut</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouseout event comes from a column header element. |
| <span class="prop-name">onColumnHeaderEnter</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse enter event comes from a column header element. |
| <span class="prop-name">onColumnHeaderLeave</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse leave event comes from a column header element. |
| <span class="prop-name">onColumnOrderChange</span> | <span class="prop-type">(param: GridColumnOrderChangeParams, event: React.MouseEvent) => void</span> | | Callback fired when a column is reordered. |
| <span class="prop-name">onColumnResize</span> | <span class="prop-type">(param: GridColumnResizeParams) => void</span> | | Callback fired while a column is being resized. |
| <span class="prop-name">onColumnWidthChange</span> | <span class="prop-type">(param: GridColumnResizeParams) => void</span> | | Callback fired when the width of a column is changed. |
| <span class="prop-name">onColumnVisibilityChange</span> | <span class="prop-type">(param: GridColumnVisibilityChangeParams) => void</span> | | Callback fired when a column visibility changes. |
| <span class="prop-name">onCellKeyDown</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.KeyboardEvent>) => void</span> | | Callback fired when a keydown event comes from a cell element. |
| <span class="prop-name">onCellOver</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse over event comes from a cell element. |
| <span class="prop-name">onCellOut</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse out comes from a cell element. |
| <span class="prop-name">onCellEnter</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse enter event comes from a cell element. |
| <span class="prop-name">onCellLeave</span> | <span class="prop-type">(params: GridCellParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse leave event comes from a cell element. |
| <span class="prop-name">onCellModeChange</span> | <span class="prop-type">(params: GridCellModeChangeParams, event: MuiEvent<{}>) => void | | Callback fired when the cell mode changed. |
| <span class="prop-name">onColumnHeaderClick</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a click event comes from a column header element. |
| <span class="prop-name">onColumnHeaderDoubleClick</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a double click event comes from a column header element. |
| <span class="prop-name">onColumnHeaderOver</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouseover event comes from a column header element. |
| <span class="prop-name">onColumnHeaderOut</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouseout event comes from a column header element. |
| <span class="prop-name">onColumnHeaderEnter</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse enter event comes from a column header element. |
| <span class="prop-name">onColumnHeaderLeave</span> | <span class="prop-type">(param: GridColumnHeaderParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse leave event comes from a column header element. |
| <span class="prop-name">onColumnOrderChange</span> | <span class="prop-type">(param: GridColumnOrderChangeParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a column is reordered. |
| <span class="prop-name">onColumnResize</span> | <span class="prop-type">(param: GridColumnResizeParams, event: MuiEvent<{}>) => void</span> | | Callback fired while a column is being resized. |
| <span class="prop-name">onColumnWidthChange</span> | <span class="prop-type">(param: GridColumnResizeParams, event: MuiEvent<{}>) => void</span> | | Callback fired when the width of a column is changed. |
| <span class="prop-name">onColumnVisibilityChange</span> | <span class="prop-type">(param: GridColumnVisibilityChangeParams, event: MuiEvent<{}>) => void</span> | | Callback fired when a column visibility changes. |
| <span class="prop-name">onError</span> | <span class="prop-type">(args: any) => void</span> | | Callback fired when an exception is thrown in the grid, or when the `showError` API method is called. |
| <span class="prop-name">onEditCellPropsChange</span> | <span class="prop-type">(params: GridEditCellPropsParams, event: React.SyntheticEvent) => void</span> | | Callback fired when the edit cell value changes. |
| <span class="prop-name">onCellEditCommit</span> | <span class="prop-type">(params: GridEditCellPropsParams, event: React.SyntheticEvent) => void</span> | | Callback fired when the cell changes are going to be committed. |
| <span class="prop-name">onEditCellPropsChange</span> | <span class="prop-type">(params: GridEditCellPropsParams, event: MouseEvent<React.SyntheticEvent>) => void</span> | | Callback fired when the edit cell value changes. |
| <span class="prop-name">onCellEditCommit</span> | <span class="prop-type">(params: GridEditCellPropsParams, event: MouseEvent<React.SyntheticEvent>) => void</span> | | Callback fired when the cell changes are going to be committed. |
| <span class="prop-name">onEditRowModelChange</span> | <span class="prop-type">(params: GridEditRowModelParams) => void</span> | | Callback fired when the EditRowModel changed. |
| <span class="prop-name">onFilterModelChange</span> | <span class="prop-type">(model: GridFilterModel) => void</span> | | Callback fired when the Filter model changes before the filters are applied. |
| <span class="prop-name">onPageChange</span> | <span class="prop-type">(page: number) => void</span> | | Callback fired when the current page has changed. |
| <span class="prop-name">onPageSizeChange</span> | <span class="prop-type">(pageSize: number) => void</span> | | Callback fired when the page size has changed. |
| <span class="prop-name">onResize</span> | <span class="prop-type">(param: GridResizeParams) => void</span> | | Callback fired when the grid is being resized. |
| <span class="prop-name">onRowClick</span> | <span class="prop-type">(param: GridRowParams, event: React.MouseEvent) => void</span> | | Callback fired when a click event comes from a row container element. |
| <span class="prop-name">onRowDoubleClick</span> | <span class="prop-type">(param: GridRowParams, event: React.MouseEvent) => void</span> | | Callback fired when a double click event comes from a row container element. |
| <span class="prop-name">onRowOver</span> | <span class="prop-type">(param: GridRowParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse over comes from a row container element. |
| <span class="prop-name">onRowOut</span> | <span class="prop-type">(param: GridRowParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse out comes from a row container element. |
| <span class="prop-name">onRowEnter</span> | <span class="prop-type">(param: GridRowParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse enter comes from a row container element. |
| <span class="prop-name">onRowLeave</span> | <span class="prop-type">(param: GridRowParams, event: React.MouseEvent) => void</span> | | Callback fired when a mouse leave event comes from a row container element. |
| <span class="prop-name">onResize</span> | <span class="prop-type">(param: GridResizeParams, event: MuiEvent<{}>) => void</span> | | Callback fired when the grid is being resized. |
| <span class="prop-name">onRowClick</span> | <span class="prop-type">(param: GridRowParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a click event comes from a row container element. |
| <span class="prop-name">onRowDoubleClick</span> | <span class="prop-type">(param: GridRowParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a double click event comes from a row container element. |
| <span class="prop-name">onRowOver</span> | <span class="prop-type">(param: GridRowParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse over comes from a row container element. |
| <span class="prop-name">onRowOut</span> | <span class="prop-type">(param: GridRowParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse out comes from a row container element. |
| <span class="prop-name">onRowEnter</span> | <span class="prop-type">(param: GridRowParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse enter comes from a row container element. |
| <span class="prop-name">onRowLeave</span> | <span class="prop-type">(param: GridRowParams, event: MouseEvent<React.MouseEvent>) => void</span> | | Callback fired when a mouse leave event comes from a row container element. |
| <span class="prop-name">onSelectionModelChange</span> | <span class="prop-type">(model: GridSelectionModel) => void</span> | | Callback fired when the selection state of one or multiple rows changes. |
| <span class="prop-name">onSortModelChange</span> | <span class="prop-type">(model: GridSortModel) => void</span> | | Callback fired when the sort model changes before a column is sorted. |
| <span class="prop-name">page</span> | <span class="prop-type">number</span> | 1 | Set the current page. |
Expand Down
Loading