Skip to content

Commit

Permalink
[docs] Add missing default loading prop value (#13604)
Browse files Browse the repository at this point in the history
Co-authored-by: Bilal Shafi <[email protected]>
  • Loading branch information
oliviertassinari and MBilalShafi authored Jul 9, 2024
1 parent ba6c7a1 commit 22f8f84
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
},
"keepColumnPositionIfDraggedOutside": { "type": { "name": "bool" }, "default": "false" },
"keepNonExistentRowsSelected": { "type": { "name": "bool" }, "default": "false" },
"loading": { "type": { "name": "bool" } },
"loading": { "type": { "name": "bool" }, "default": "false" },
"localeText": { "type": { "name": "object" } },
"logger": {
"type": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
},
"keepColumnPositionIfDraggedOutside": { "type": { "name": "bool" }, "default": "false" },
"keepNonExistentRowsSelected": { "type": { "name": "bool" }, "default": "false" },
"loading": { "type": { "name": "bool" } },
"loading": { "type": { "name": "bool" }, "default": "false" },
"localeText": { "type": { "name": "object" } },
"logger": {
"type": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
}
},
"keepNonExistentRowsSelected": { "type": { "name": "bool" }, "default": "false" },
"loading": { "type": { "name": "bool" } },
"loading": { "type": { "name": "bool" }, "default": "false" },
"localeText": { "type": { "name": "object" } },
"logger": {
"type": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ DataGridPremiumRaw.propTypes = {
keepNonExistentRowsSelected: PropTypes.bool,
/**
* If `true`, a loading overlay is displayed.
* @default false
*/
loading: PropTypes.bool,
/**
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ DataGridProRaw.propTypes = {
keepNonExistentRowsSelected: PropTypes.bool,
/**
* If `true`, a loading overlay is displayed.
* @default false
*/
loading: PropTypes.bool,
/**
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid/src/DataGrid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ DataGridRaw.propTypes = {
keepNonExistentRowsSelected: PropTypes.bool,
/**
* If `true`, a loading overlay is displayed.
* @default false
*/
loading: PropTypes.bool,
/**
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid/src/DataGrid/useDataGridProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES: DataGridPropsWithDefaultValues = {
rowPositionsDebounceMs: 166,
autosizeOnMount: false,
disableAutosize: false,
loading: false,
};

const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
Expand Down
9 changes: 5 additions & 4 deletions packages/x-data-grid/src/models/props/DataGridProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
* @default "error" ("warn" in dev mode)
*/
logLevel: keyof Logger | false;
/**
* If `true`, a loading overlay is displayed.
* @default false
*/
loading: boolean;
/**
* If `true`, pagination is enabled.
* @default false
Expand Down Expand Up @@ -735,10 +740,6 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
* Return the id of a given [[GridRowModel]].
*/
getRowId?: GridRowIdGetter<R>;
/**
* If `true`, a loading overlay is displayed.
*/
loading?: boolean;
/**
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
*/
Expand Down

0 comments on commit 22f8f84

Please sign in to comment.