Skip to content

Commit

Permalink
[data grid] Add onMenuOpen and onMenuClose props (#4825)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanailH authored May 23, 2022
1 parent ace315b commit a0325a5
Show file tree
Hide file tree
Showing 26 changed files with 127 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/data/data-grid/events/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@
"params": "GridHeaderSelectionCheckboxParams",
"event": "MuiEvent<{}>"
},
{
"name": "menuClose",
"description": "Fired when the grid menu is closed.",
"params": "GridMenuParams",
"event": "MuiEvent<{}>"
},
{
"name": "menuOpen",
"description": "Fired when the menu is opened.",
"params": "GridMenuParams",
"event": "MuiEvent<{}>"
},
{
"name": "pageChange",
"description": "Fired when the page changes.",
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
"onEditRowsModelChange": { "type": { "name": "func" } },
"onError": { "type": { "name": "func" } },
"onFilterModelChange": { "type": { "name": "func" } },
"onMenuClose": { "type": { "name": "func" } },
"onMenuOpen": { "type": { "name": "func" } },
"onPageChange": { "type": { "name": "func" } },
"onPageSizeChange": { "type": { "name": "func" } },
"onPinnedColumnsChange": { "type": { "name": "func" } },
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
"onEditRowsModelChange": { "type": { "name": "func" } },
"onError": { "type": { "name": "func" } },
"onFilterModelChange": { "type": { "name": "func" } },
"onMenuClose": { "type": { "name": "func" } },
"onMenuOpen": { "type": { "name": "func" } },
"onPageChange": { "type": { "name": "func" } },
"onPageSizeChange": { "type": { "name": "func" } },
"onPinnedColumnsChange": { "type": { "name": "func" } },
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
"onEditRowsModelChange": { "type": { "name": "func" } },
"onError": { "type": { "name": "func" } },
"onFilterModelChange": { "type": { "name": "func" } },
"onMenuClose": { "type": { "name": "func" } },
"onMenuOpen": { "type": { "name": "func" } },
"onPageChange": { "type": { "name": "func" } },
"onPageSizeChange": { "type": { "name": "func" } },
"onPreferencePanelClose": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onPageChange": "Callback fired when the current page has changed.<br><br><strong>Signature:</strong><br><code>function(page: number, details: GridCallbackDetails) =&gt; void</code><br><em>page:</em> Index of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPageSizeChange": "Callback fired when the page size has changed.<br><br><strong>Signature:</strong><br><code>function(pageSize: number, details: GridCallbackDetails) =&gt; void</code><br><em>pageSize:</em> Size of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPinnedColumnsChange": "Callback fired when the pinned columns have changed.<br><br><strong>Signature:</strong><br><code>function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) =&gt; void</code><br><em>pinnedColumns:</em> The changed pinned columns.<br><em>details:</em> Additional details for this callback.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onPageChange": "Callback fired when the current page has changed.<br><br><strong>Signature:</strong><br><code>function(page: number, details: GridCallbackDetails) =&gt; void</code><br><em>page:</em> Index of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPageSizeChange": "Callback fired when the page size has changed.<br><br><strong>Signature:</strong><br><code>function(pageSize: number, details: GridCallbackDetails) =&gt; void</code><br><em>pageSize:</em> Size of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPinnedColumnsChange": "Callback fired when the pinned columns have changed.<br><br><strong>Signature:</strong><br><code>function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) =&gt; void</code><br><em>pinnedColumns:</em> The changed pinned columns.<br><em>details:</em> Additional details for this callback.",
Expand Down
2 changes: 2 additions & 0 deletions docs/translations/api-docs/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onPageChange": "Callback fired when the current page has changed.<br><br><strong>Signature:</strong><br><code>function(page: number, details: GridCallbackDetails) =&gt; void</code><br><em>page:</em> Index of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPageSizeChange": "Callback fired when the page size has changed.<br><br><strong>Signature:</strong><br><code>function(pageSize: number, details: GridCallbackDetails) =&gt; void</code><br><em>pageSize:</em> Size of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPinnedColumnsChange": "Callback fired when the pinned columns have changed.<br><br><strong>Signature:</strong><br><code>function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) =&gt; void</code><br><em>pinnedColumns:</em> The changed pinned columns.<br><em>details:</em> Additional details for this callback.",
Expand Down
2 changes: 2 additions & 0 deletions docs/translations/api-docs/data-grid/data-grid-pro-pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onPageChange": "Callback fired when the current page has changed.<br><br><strong>Signature:</strong><br><code>function(page: number, details: GridCallbackDetails) =&gt; void</code><br><em>page:</em> Index of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPageSizeChange": "Callback fired when the page size has changed.<br><br><strong>Signature:</strong><br><code>function(pageSize: number, details: GridCallbackDetails) =&gt; void</code><br><em>pageSize:</em> Size of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPinnedColumnsChange": "Callback fired when the pinned columns have changed.<br><br><strong>Signature:</strong><br><code>function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) =&gt; void</code><br><em>pinnedColumns:</em> The changed pinned columns.<br><em>details:</em> Additional details for this callback.",
Expand Down
2 changes: 2 additions & 0 deletions docs/translations/api-docs/data-grid/data-grid-pro-zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onPageChange": "Callback fired when the current page has changed.<br><br><strong>Signature:</strong><br><code>function(page: number, details: GridCallbackDetails) =&gt; void</code><br><em>page:</em> Index of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPageSizeChange": "Callback fired when the page size has changed.<br><br><strong>Signature:</strong><br><code>function(pageSize: number, details: GridCallbackDetails) =&gt; void</code><br><em>pageSize:</em> Size of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPinnedColumnsChange": "Callback fired when the pinned columns have changed.<br><br><strong>Signature:</strong><br><code>function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) =&gt; void</code><br><em>pinnedColumns:</em> The changed pinned columns.<br><em>details:</em> Additional details for this callback.",
Expand Down
2 changes: 2 additions & 0 deletions docs/translations/api-docs/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onPageChange": "Callback fired when the current page has changed.<br><br><strong>Signature:</strong><br><code>function(page: number, details: GridCallbackDetails) =&gt; void</code><br><em>page:</em> Index of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPageSizeChange": "Callback fired when the page size has changed.<br><br><strong>Signature:</strong><br><code>function(pageSize: number, details: GridCallbackDetails) =&gt; void</code><br><em>pageSize:</em> Size of the page displayed on the Grid.<br><em>details:</em> Additional details for this callback.",
"onPinnedColumnsChange": "Callback fired when the pinned columns have changed.<br><br><strong>Signature:</strong><br><code>function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) =&gt; void</code><br><em>pinnedColumns:</em> The changed pinned columns.<br><em>details:</em> Additional details for this callback.",
Expand Down
Loading

0 comments on commit a0325a5

Please sign in to comment.