diff --git a/docs/pages/x/api/data-grid/data-grid-premium.json b/docs/pages/x/api/data-grid/data-grid-premium.json index bce75b9e5e66..1c79c35a04e6 100644 --- a/docs/pages/x/api/data-grid/data-grid-premium.json +++ b/docs/pages/x/api/data-grid/data-grid-premium.json @@ -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": { diff --git a/docs/pages/x/api/data-grid/data-grid-pro.json b/docs/pages/x/api/data-grid/data-grid-pro.json index 7767957b769d..c3eb24a2ffb8 100644 --- a/docs/pages/x/api/data-grid/data-grid-pro.json +++ b/docs/pages/x/api/data-grid/data-grid-pro.json @@ -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": { diff --git a/docs/pages/x/api/data-grid/data-grid.json b/docs/pages/x/api/data-grid/data-grid.json index 0691480696ad..7543c9d9f0ab 100644 --- a/docs/pages/x/api/data-grid/data-grid.json +++ b/docs/pages/x/api/data-grid/data-grid.json @@ -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": { diff --git a/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx b/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx index 2cba34da09e7..13c08a00b7e1 100644 --- a/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx +++ b/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx @@ -504,6 +504,7 @@ DataGridPremiumRaw.propTypes = { keepNonExistentRowsSelected: PropTypes.bool, /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** diff --git a/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx b/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx index 7f7c45fa1d5e..1cacac533b70 100644 --- a/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx +++ b/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx @@ -459,6 +459,7 @@ DataGridProRaw.propTypes = { keepNonExistentRowsSelected: PropTypes.bool, /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** diff --git a/packages/x-data-grid/src/DataGrid/DataGrid.tsx b/packages/x-data-grid/src/DataGrid/DataGrid.tsx index 7c567b6774a2..ab054cbab917 100644 --- a/packages/x-data-grid/src/DataGrid/DataGrid.tsx +++ b/packages/x-data-grid/src/DataGrid/DataGrid.tsx @@ -373,6 +373,7 @@ DataGridRaw.propTypes = { keepNonExistentRowsSelected: PropTypes.bool, /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** diff --git a/packages/x-data-grid/src/DataGrid/useDataGridProps.ts b/packages/x-data-grid/src/DataGrid/useDataGridProps.ts index 2af3393e1ea1..1cd75b30f70b 100644 --- a/packages/x-data-grid/src/DataGrid/useDataGridProps.ts +++ b/packages/x-data-grid/src/DataGrid/useDataGridProps.ts @@ -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; diff --git a/packages/x-data-grid/src/models/props/DataGridProps.ts b/packages/x-data-grid/src/models/props/DataGridProps.ts index 19fc5d2cf42a..47a56c9a742a 100644 --- a/packages/x-data-grid/src/models/props/DataGridProps.ts +++ b/packages/x-data-grid/src/models/props/DataGridProps.ts @@ -261,6 +261,11 @@ export interface DataGridPropsWithDefaultValues; - /** - * 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). */