Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1b82f63
[DataGrid] New editing API
m4theushw Feb 23, 2022
e0f964c
Merge branch 'master' into new-editing-api
m4theushw Feb 25, 2022
bfc57f6
Fix memory leak
m4theushw Feb 25, 2022
889cd2d
Return a value if it updated the row
m4theushw Feb 25, 2022
950ed15
Don't change cell/row mode if it has error
m4theushw Feb 25, 2022
550a074
enableNewEditingAPI -> newEditingApi
m4theushw Feb 28, 2022
ad61da6
Merge branch 'master' into new-editing-api
m4theushw Mar 1, 2022
5eb4792
Merge branch 'master' into new-editing-api
m4theushw Mar 2, 2022
f77919b
Describe unstable methods
m4theushw Mar 2, 2022
5298dc7
Improve wording on new methods
m4theushw Mar 2, 2022
e880681
Param is only available in the new API
m4theushw Mar 2, 2022
9c46b44
yarn docs:api
m4theushw Mar 2, 2022
da8abc5
Add new API to DataGrid too
m4theushw Mar 3, 2022
e495232
Fix types
m4theushw Mar 3, 2022
6b61200
yarn docs:api
m4theushw Mar 3, 2022
a0af424
Organize APIs
m4theushw Mar 4, 2022
e6494d4
Pass otherFieldsProps
m4theushw Mar 4, 2022
81bc0f2
Merge branch 'master' into new-editing-api
m4theushw Mar 4, 2022
fedb107
Fix typo
m4theushw Mar 4, 2022
76be9b1
Extend GridCellParams
m4theushw Mar 4, 2022
c66a2cd
Return 'view' if on cell editing
m4theushw Mar 4, 2022
679a40c
Support for Tab
m4theushw Mar 5, 2022
9eed614
Merge branch 'master' into new-editing-api
m4theushw Mar 7, 2022
4fbed5c
Fix types
m4theushw Mar 7, 2022
3540d57
yarn prettier
m4theushw Mar 7, 2022
1b398f6
Merge branch 'master' into new-editing-api
m4theushw Mar 11, 2022
d3167e0
Type value with any as default
m4theushw Mar 11, 2022
17f3bab
Fix export bug with CSB
m4theushw Mar 11, 2022
ee0b648
cellToMoveFocus -> cellToFocusAfter
m4theushw Mar 11, 2022
835c66d
Remove originalRow
m4theushw Mar 11, 2022
7ca90ca
Make reason optional
m4theushw Mar 11, 2022
4dacc49
yarn docs:api
m4theushw Mar 11, 2022
50b49bf
Accept value without promise
m4theushw Mar 14, 2022
dd10c21
Merge branch 'master' into new-editing-api
m4theushw Mar 15, 2022
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 docs/data/data-grid/events/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
{
"name": "cellEditStart",
"description": "Fired when the cell turns to edit mode.",
"params": "GridCellParams",
"params": "GridCellEditStartParams",
"event": "MuiEvent<React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>>"
},
{
"name": "cellEditStop",
"description": "Fired when the cell turns back to view mode.",
"params": "GridCellParams",
"params": "GridCellEditStopParams",
"event": "MuiEvent<MuiBaseEvent>"
},
{
Expand Down Expand Up @@ -200,13 +200,13 @@
{
"name": "rowEditStart",
"description": "Fired when the row turns to edit mode.",
"params": "GridRowParams",
"params": "GridRowEditStartParams",
"event": "MuiEvent<React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>>"
},
{
"name": "rowEditStop",
"description": "Fired when the row turns back to view mode.",
"params": "GridRowParams",
"params": "GridRowEditStopParams",
"event": "MuiEvent<MuiBaseEvent>"
},
{
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/api-docs/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"experimentalFeatures": {
"type": {
"name": "shape",
"description": "{ preventCommitWhileValidating?: bool, rowGrouping?: bool, warnIfFocusStateIsNotSynced?: bool }"
"description": "{ newEditingApi?: bool, preventCommitWhileValidating?: bool, rowGrouping?: bool, warnIfFocusStateIsNotSynced?: bool }"
}
},
"filterMode": {
Expand Down Expand Up @@ -170,6 +170,7 @@
"description": "{ left?: Array&lt;string&gt;, right?: Array&lt;string&gt; }"
}
},
"processRowUpdate": { "type": { "name": "func" } },
"rowBuffer": { "type": { "name": "number" }, "default": "3" },
"rowCount": { "type": { "name": "number" } },
"rowGroupingColumnMode": {
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/api-docs/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"experimentalFeatures": {
"type": {
"name": "shape",
"description": "{ preventCommitWhileValidating?: bool, warnIfFocusStateIsNotSynced?: bool }"
"description": "{ newEditingApi?: bool, preventCommitWhileValidating?: bool, warnIfFocusStateIsNotSynced?: bool }"
}
},
"filterMode": {
Expand Down Expand Up @@ -128,6 +128,7 @@
"type": { "name": "enum", "description": "'client'<br>&#124;&nbsp;'server'" },
"default": "\"client\""
},
"processRowUpdate": { "type": { "name": "func" } },
"rowBuffer": { "type": { "name": "number" }, "default": "3" },
"rowCount": { "type": { "name": "number" } },
"rowHeight": { "type": { "name": "number" }, "default": "52" },
Expand Down
202 changes: 103 additions & 99 deletions docs/pages/api-docs/data-grid/grid-api.md

Large diffs are not rendered by default.

24 changes: 22 additions & 2 deletions docs/pages/api-docs/data-grid/grid-editing-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"properties": [
{
"name": "commitCellChange",
"description": "Updates the field at the given id with the value stored in the edit row model.",
"description": "Updates the field corresponding to the given id with the value stored in the edit row model.",
"type": "(params: GridCommitCellChangeParams, event?: MuiBaseEvent) => boolean | Promise<boolean>"
},
{
"name": "commitRowChange",
"description": "Updates the row at the given id with the values stored in the edit row model.",
"description": "Updates the row corresponding to the given id with the values stored in the edit row model.",
"type": "(id: GridRowId, event?: MuiBaseEvent) => boolean | Promise<boolean>"
},
{
Expand Down Expand Up @@ -51,6 +51,26 @@
"name": "setRowMode",
"description": "Sets the mode of a row.",
"type": "(id: GridRowId, mode: GridRowMode) => void"
},
{
"name": "startCellEditMode",
"description": "Puts the cell corresponding to the given row id and field into edit mode.",
"type": "(params: GridStartCellEditModeParams) => void"
},
{
"name": "startRowEditMode",
"description": "Puts the row corresponding to the given id into edit mode.",
"type": "(params: GridStartRowEditModeParams) => void"
},
{
"name": "stopCellEditMode",
"description": "Puts the cell corresponding to the given row id and field into view mode and updates the original row with the new value stored.\nIf <code>params.ignoreModifications</code> is <code>false</code> it will discard the modifications made.",
"type": "(params: GridStopCellEditModeParams) => Promise<boolean>"
},
{
"name": "stopRowEditMode",
"description": "Puts the row corresponding to the given id and into view mode and updates the original row with the new values stored.\nIf <code>params.ignoreModifications</code> is <code>false</code> it will discard the modifications made.",
"type": "(params: GridStopRowEditModeParams) => Promise<boolean>"
}
]
}
3 changes: 2 additions & 1 deletion docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"experimentalFeatures": {
"type": {
"name": "shape",
"description": "{ preventCommitWhileValidating?: bool, rowGrouping?: bool, warnIfFocusStateIsNotSynced?: bool }"
"description": "{ newEditingApi?: bool, preventCommitWhileValidating?: bool, rowGrouping?: bool, warnIfFocusStateIsNotSynced?: bool }"
}
},
"filterMode": {
Expand Down Expand Up @@ -170,6 +170,7 @@
"description": "{ left?: Array&lt;string&gt;, right?: Array&lt;string&gt; }"
}
},
"processRowUpdate": { "type": { "name": "func" } },
"rowBuffer": { "type": { "name": "number" }, "default": "3" },
"rowCount": { "type": { "name": "number" } },
"rowGroupingColumnMode": {
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"experimentalFeatures": {
"type": {
"name": "shape",
"description": "{ preventCommitWhileValidating?: bool, warnIfFocusStateIsNotSynced?: bool }"
"description": "{ newEditingApi?: bool, preventCommitWhileValidating?: bool, warnIfFocusStateIsNotSynced?: bool }"
}
},
"filterMode": {
Expand Down Expand Up @@ -128,6 +128,7 @@
"type": { "name": "enum", "description": "'client'<br>&#124;&nbsp;'server'" },
"default": "\"client\""
},
"processRowUpdate": { "type": { "name": "func" } },
"rowBuffer": { "type": { "name": "number" }, "default": "3" },
"rowCount": { "type": { "name": "number" } },
"rowHeight": { "type": { "name": "number" }, "default": "52" },
Expand Down
Loading