Skip to content

Commit 4f09889

Browse files
oliviertassinariMBilalShafi
authored andcommitted
[docs] Add missing default loading prop value (mui#13604)
Co-authored-by: Bilal Shafi <[email protected]>
1 parent 224ba41 commit 4f09889

File tree

8 files changed

+12
-7
lines changed

8 files changed

+12
-7
lines changed

docs/pages/x/api/data-grid/data-grid-premium.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
},
206206
"keepColumnPositionIfDraggedOutside": { "type": { "name": "bool" }, "default": "false" },
207207
"keepNonExistentRowsSelected": { "type": { "name": "bool" }, "default": "false" },
208-
"loading": { "type": { "name": "bool" } },
208+
"loading": { "type": { "name": "bool" }, "default": "false" },
209209
"localeText": { "type": { "name": "object" } },
210210
"logger": {
211211
"type": {

docs/pages/x/api/data-grid/data-grid-pro.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
},
183183
"keepColumnPositionIfDraggedOutside": { "type": { "name": "bool" }, "default": "false" },
184184
"keepNonExistentRowsSelected": { "type": { "name": "bool" }, "default": "false" },
185-
"loading": { "type": { "name": "bool" } },
185+
"loading": { "type": { "name": "bool" }, "default": "false" },
186186
"localeText": { "type": { "name": "object" } },
187187
"logger": {
188188
"type": {

docs/pages/x/api/data-grid/data-grid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
}
142142
},
143143
"keepNonExistentRowsSelected": { "type": { "name": "bool" }, "default": "false" },
144-
"loading": { "type": { "name": "bool" } },
144+
"loading": { "type": { "name": "bool" }, "default": "false" },
145145
"localeText": { "type": { "name": "object" } },
146146
"logger": {
147147
"type": {

packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ DataGridPremiumRaw.propTypes = {
504504
keepNonExistentRowsSelected: PropTypes.bool,
505505
/**
506506
* If `true`, a loading overlay is displayed.
507+
* @default false
507508
*/
508509
loading: PropTypes.bool,
509510
/**

packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ DataGridProRaw.propTypes = {
459459
keepNonExistentRowsSelected: PropTypes.bool,
460460
/**
461461
* If `true`, a loading overlay is displayed.
462+
* @default false
462463
*/
463464
loading: PropTypes.bool,
464465
/**

packages/x-data-grid/src/DataGrid/DataGrid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ DataGridRaw.propTypes = {
373373
keepNonExistentRowsSelected: PropTypes.bool,
374374
/**
375375
* If `true`, a loading overlay is displayed.
376+
* @default false
376377
*/
377378
loading: PropTypes.bool,
378379
/**

packages/x-data-grid/src/DataGrid/useDataGridProps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES: DataGridPropsWithDefaultValues = {
7777
rowPositionsDebounceMs: 166,
7878
autosizeOnMount: false,
7979
disableAutosize: false,
80+
loading: false,
8081
};
8182

8283
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;

packages/x-data-grid/src/models/props/DataGridProps.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
261261
* @default "error" ("warn" in dev mode)
262262
*/
263263
logLevel: keyof Logger | false;
264+
/**
265+
* If `true`, a loading overlay is displayed.
266+
* @default false
267+
*/
268+
loading: boolean;
264269
/**
265270
* If `true`, pagination is enabled.
266271
* @default false
@@ -735,10 +740,6 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
735740
* Return the id of a given [[GridRowModel]].
736741
*/
737742
getRowId?: GridRowIdGetter<R>;
738-
/**
739-
* If `true`, a loading overlay is displayed.
740-
*/
741-
loading?: boolean;
742743
/**
743744
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
744745
*/

0 commit comments

Comments
 (0)