diff --git a/docs/pages/api-docs/data-grid/data-grid.md b/docs/pages/api-docs/data-grid/data-grid.md index f868176c016ee..c8990be480f9b 100644 --- a/docs/pages/api-docs/data-grid/data-grid.md +++ b/docs/pages/api-docs/data-grid/data-grid.md @@ -27,6 +27,7 @@ import { DataGrid } from '@material-ui/data-grid'; | components | GridSlotsComponent | | Overrideable components. | | componentsProps | GridSlotsComponentsProps | | Overrideable components props dynamically passed to the component at rendering. | | density | Density | standard | Sets the density of the grid. | +| disableColumnFilter | boolean | false | If `true`, column filters are disabled. | | disableColumnMenu | boolean | false | If `true`, the column menu is disabled. | | disableColumnSelector | boolean | false | If `true`, the column selector is disabled. | | disableDensitySelector | boolean | false | If `true`, the density selector is disabled. | @@ -34,6 +35,7 @@ import { DataGrid } from '@material-ui/data-grid'; | disableSelectionOnClick | boolean | false | If `true`, the selection on click on a row or cell is disabled. | | error | any | | An error that will turn the grid into its error state and display the error component. | | editRowsModel | GridEditRowsModel | undefined | Set the edit rows model of the grid. | +| filterMode | GridFeatureMode | 'client' | Filtering can be processed on the server or client-side. Set it to `server` if you would like to handle filtering on the server-side. | | filterModel | GridFilterModel | | Set the filter model of the grid. | | getCellClassName | (params: GridCellParams) => string | | Function that applies CSS classes dynamically on cells. | | getRowClassName | (params: GridRowParams) => string | | Function that applies CSS classes dynamically on rows. | @@ -44,15 +46,18 @@ import { DataGrid } from '@material-ui/data-grid'; | hideFooterRowCount | boolean | false | If `true`, the row count in the footer is hidden. | | hideFooterSelectedRowCount | boolean | false | If `true`, the selected row count in the footer is hidden. | | icons | IconsOptions | | Set of icons used in the grid. | -| isCellEditable | (params: GridCellParams) => boolean | | Callback fired when a cell is rendered, returns true if the cell is editable. | +| isCellEditable | (params: GridCellParams) => boolean | | Callback fired when a cell is rendered, returns `true` if the cell is editable. | | isRowSelectable | (params: GridRowParams) => boolean | | Determines if a row can be selected. | | loading | boolean | false | If `true`, a loading overlay is displayed. | | localeText | GridLocaleText | | Set of text labels used in the grid. You can find all the translation keys supported in [the source](https://github.com/mui-org/material-ui-x/blob/HEAD/packages/grid/_modules_/grid/constants/localeTextConstants.ts) in the GitHub repository. | | logger | Logger | null | Pass a custom logger in the components that implements the 'Logger' interface. | -| logLevel | string | false | false | Allows to pass the logging level or false to turn off logging. | +| logLevel | string \| false | false | Allows to pass the logging level or false to turn off logging. | | nonce | string | | Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute). | +| onCellBlur | (params: GridCellParams, event: React.FocusEvent) => void | | Callback fired when the active element leaves a cell. | | onCellClick | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a click event comes from a cell element. | | onCellDoubleClick | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a double click event comes from a cell element. | +| onCellFocusOut | (params: GridCellParams, event?: MuiEvent) => void | | Callback fired when a cell loses focus. | +| onCellKeyDown | (params: GridCellParams, event: React.KeyboardEvent) => void | | Callback fired when a keydown event comes from a cell element. | | onCellOver | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a mouse over event comes from a cell element. | | onCellOut | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a mouse out comes from a cell element. | | onCellEnter | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a mouse enter event comes from a cell element. | @@ -82,7 +87,7 @@ import { DataGrid } from '@material-ui/data-grid'; | onRowOut | (param: GridRowParams, event: React.MouseEvent) => void | | Callback fired when a mouse out comes from a row container element. | | onRowEnter | (param: GridRowParams, event: React.MouseEvent) => void | | Callback fired when a mouse enter comes from a row container element. | | onRowLeave | (param: GridRowParams, event: React.MouseEvent) => void | | Callback fired when a mouse leave event comes from a row container element. | -| onSelectionModelChange | (param: GridSelectionModelChangeParams) => void | | Callback fired when the selection state of one or multiple rows changes. | +| onSelectionModelChange | (model: GridSelectionModel) => void | | Callback fired when the selection state of one or multiple rows changes. | | onSortModelChange | (model: GridSortModel) => void | | Callback fired when the sort model changes before a column is sorted. | | page | number | 1 | Set the current page. | | pageSize | number | 100 | Set the number of rows in one page. | diff --git a/docs/pages/api-docs/data-grid/x-grid.md b/docs/pages/api-docs/data-grid/x-grid.md index ff550b3d51709..08345a3936e47 100644 --- a/docs/pages/api-docs/data-grid/x-grid.md +++ b/docs/pages/api-docs/data-grid/x-grid.md @@ -29,16 +29,20 @@ import { XGrid } from '@material-ui/x-grid'; | components | GridSlotsComponent | | Overrideable components slots. | | componentsProps | GridSlotsComponentsProps | | Overrideable components props dynamically passed to the component at rendering. | | density | Density | standard | Sets the density of the grid. | +| disableColumnFilter | boolean | false | If `true`, column filters are disabled. | | disableColumnMenu | boolean | false | If `true`, the column menu is disabled. | +| disableColumnReorder | boolean | false | If `true`, reordering columns is disabled. | | disableColumnSelector | boolean | false | If `true`, the column selector is disabled. | | disableColumnResize | boolean | false | If `true`, resizing columns is disabled. | | disableDensitySelector | boolean | false | If `true`, the density selector is disabled. | | disableExtendRowFullWidth | boolean | false | If `true`, rows will not be extended to fill the full width of the grid container. | +| disableMultipleColumnsFiltering | boolean | false | If `true`, filtering with multiple columns is disabled. | | disableMultipleColumnsSorting | boolean | false | If `true`, sorting with multiple columns is disabled. | | disableMultipleSelection | boolean | false | If `true`, multiple selection using the CTRL or CMD key is disabled. | | disableSelectionOnClick | boolean | false | If `true`, the selection on click on a row or cell is disabled. | | error | any | | An error that will turn the grid into its error state and display the error component. | | editRowsModel | GridEditRowsModel | undefined | Set the edit rows model of the grid. | +| filterMode | GridFeatureMode | 'client' | Filtering can be processed on the server or client-side. Set it to `server` if you would like to handle filtering on the server-side. | | filterModel | GridFilterModel | | Set the filter model of the grid. | | getCellClassName | (params: GridCellParams) => string | | Function that applies CSS classes dynamically on cells. | | getRowClassName | (params: GridRowParams) => string | | Function that applies CSS classes dynamically on rows. | @@ -49,15 +53,18 @@ import { XGrid } from '@material-ui/x-grid'; | hideFooterRowCount | boolean | false | If `true`, the row count in the footer is hidden. | | hideFooterSelectedRowCount | boolean | false | If `true`, the selected row count in the footer is hidden. | | icons | IconsOptions | | Set of icons used in the grid. | -| isCellEditable | (params: GridCellParams) => boolean | | Callback fired when a cell is rendered, returns true if the cell is editable. | +| isCellEditable | (params: GridCellParams) => boolean | | Callback fired when a cell is rendered, returns `true` if the cell is editable. | | isRowSelectable | (params: GridRowParams) => boolean | | Determines if a row can be selected. | | loading | boolean | false | If `true`, a loading overlay is displayed.. | | localeText | GridLocaleText | | Set of text labels used in the grid. You can find all the translation keys supported in [the source](https://github.com/mui-org/material-ui-x/blob/HEAD/packages/grid/_modules_/grid/constants/localeTextConstants.ts) in the GitHub repository. | | logger | Logger | null | Pass a custom logger in the components that implements the 'Logger' interface. | -| logLevel | string | false | false | Allows to pass the logging level or false to turn off logging. | +| logLevel | string \| false | false | Allows to pass the logging level or false to turn off logging. | | nonce | string | | Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute). | +| onCellBlur | (params: GridCellParams, event: React.FocusEvent) => void | | Callback fired when the active element leaves a cell. | | onCellClick | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a click event comes from a cell element. | | onCellDoubleClick | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a double click event comes from a cell element. | +| onCellFocusOut | (params: GridCellParams, event?: MuiEvent) => void | | Callback fired when a cell loses focus. | +| onCellKeyDown | (params: GridCellParams, event: React.KeyboardEvent) => void | | Callback fired when a keydown event comes from a cell element. | | onCellOver | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a mouse over event comes from a cell element. | | onCellOut | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a mouse out comes from a cell element. | | onCellEnter | (params: GridCellParams, event: React.MouseEvent) => void | | Callback fired when a mouse enter event comes from a cell element. | @@ -88,7 +95,7 @@ import { XGrid } from '@material-ui/x-grid'; | onRowEnter | (param: GridRowParams, event: React.MouseEvent) => void | | Callback fired when a mouse enter comes from a row container element. | | onRowLeave | (param: GridRowParams, event: React.MouseEvent) => void | | Callback fired when a mouse leave event comes from a row container element. | | onRowsScrollEnd | (param: GridRowScrollEndParams) => void | | Callback fired when scrolling to the bottom of the grid viewport. | -| onSelectionModelChange | (param: GridSelectionModelChangeParams) => void | | Callback fired when the selection state of one or multiple rows changes. | +| onSelectionModelChange | (model: GridSelectionModel) => void | | Callback fired when the selection state of one or multiple rows changes. | | onSortModelChange | (model: GridSortModel) => void | | Callback fired when the sort model changes before a column is sorted. | | page | number | 1 | Set the current page. | | pageSize | number | 100 | Set the number of rows in one page. | diff --git a/packages/grid/_modules_/grid/models/gridOptions.tsx b/packages/grid/_modules_/grid/models/gridOptions.tsx index 58f15b93d5f57..1b260798d0f27 100644 --- a/packages/grid/_modules_/grid/models/gridOptions.tsx +++ b/packages/grid/_modules_/grid/models/gridOptions.tsx @@ -135,8 +135,8 @@ export interface GridOptions { editRowsModel?: GridEditRowsModel; /** * Filtering can be processed on the server or client-side. - * Set it to 'client' if you would like to handle filtering on the client-side. * Set it to 'server' if you would like to handle filtering on the server-side. + * @default "client" */ filterMode?: GridFeatureMode; /**