You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/data/data-grid/list-view/list-view.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@
2
2
title: Data Grid - List view
3
3
---
4
4
5
-
# Data Grid - List view [<spanclass="plan-pro"></span>](/x/introduction/licensing/#pro-plan'Pro plan')
5
+
# Data Grid - List view [<spanclass="plan-pro"></span>](/x/introduction/licensing/#pro-plan'Pro plan')🧪
6
6
7
7
<pclass="description">Display data in a single-column list view. Can be used to present a more compact grid on smaller screens and mobile devices.</p>
8
8
9
+
:::warning
10
+
This feature is marked as **unstable**. While you can use this feature in production, the API could change in the future.
11
+
:::
12
+
9
13
List view can be enabled by providing the `unstable_listView` prop.
10
14
11
15
Unlike the default grid view, the list view makes no assumptions on how data is presented to end users.
12
16
13
17
In order to display data in a list view, a `unstable_listColumn` prop must be provided with a `renderCell` function.
14
18
15
-
:::warning
16
-
This feature is under development and is marked as **unstable**. While you can use the list view feature in production, the API could change in the future.
Copy file name to clipboardexpand all lines: docs/data/data-grid/server-side-data/index.md
+15-17
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,16 @@
2
2
title: React Data Grid - Server-side data
3
3
---
4
4
5
-
# Data Grid - Server-side data [<spanclass="plan-pro"></span>](/x/introduction/licensing/#pro-plan'Pro plan')
5
+
# Data Grid - Server-side data [<spanclass="plan-pro"></span>](/x/introduction/licensing/#pro-plan'Pro plan')🧪
6
6
7
7
<pclass="description">The Data Grid server-side data.</p>
8
8
9
+
:::warning
10
+
This feature is under development and is marked as **unstable**.
11
+
While you can use this feature in production, the API could change in the future.
12
+
Feel free to subscribe or comment on the official GitHub [umbrella issue](https://github.com/mui/mui-x/issues/8179).
13
+
:::
14
+
9
15
## Introduction
10
16
11
17
Server-side data management in React can become complex with growing datasets.
@@ -72,14 +78,6 @@ The idea for a centralized data source is to simplify server-side data fetching.
72
78
It's an abstraction layer between the Data Grid and the server, providing a simple interface for interacting with the server.
73
79
Think of it like an intermediary handling the communication between the Data Grid (client) and the actual data source (server).
74
80
75
-
:::warning
76
-
77
-
This feature is under development and is marked as **unstable**.
78
-
The information shared on this page could change in the future.
79
-
Feel free to subscribe or comment on the official GitHub [umbrella issue](https://github.com/mui/mui-x/issues/8179).
80
-
81
-
:::
82
-
83
81
It has an initial set of required methods that you need to implement. The Data Grid will use these methods internally to fetch a subset of data when needed.
84
82
85
83
Let's take a look at the minimal `GridDataSource` interface configuration.
@@ -88,8 +86,9 @@ Let's take a look at the minimal `GridDataSource` interface configuration.
88
86
interfaceGridDataSource {
89
87
/**
90
88
* This method will be called when the grid needs to fetch some rows.
91
-
* @param{GridGetRowsParams}params The parameters required to fetch the rows
92
-
* @returns{Promise<GridGetRowsResponse>} A promise that resolves to the data of type [GridGetRowsResponse]
89
+
* @param{GridGetRowsParams}params The parameters required to fetch the rows.
90
+
* @returns{Promise<GridGetRowsResponse>} A promise that resolves to the data of
@@ -133,7 +132,7 @@ The code has been significantly reduced, the need for managing the controlled st
133
132
134
133
The data source changes how the existing server-side features like `filtering`, `sorting`, and `pagination` work.
135
134
136
-
**Without data source**
135
+
### Without data source
137
136
138
137
When there's no data source, the features `filtering`, `sorting`, `pagination` work on `client` by default.
139
138
In order for them to work with server-side data, you need to set them to `server` explicitly and provide the [`onFilterModelChange`](/x/react-data-grid/filtering/server-side/), [`onSortModelChange`](/x/react-data-grid/sorting/#server-side-sorting), [`onPaginationModelChange`](/x/react-data-grid/pagination/#server-side-pagination) event handlers to fetch the data from the server based on the updated variables.
@@ -158,7 +157,7 @@ In order for them to work with server-side data, you need to set them to `server
158
157
/>
159
158
```
160
159
161
-
**With data source**
160
+
### With data source
162
161
163
162
With the data source, the features `filtering`, `sorting`, `pagination` are automatically set to `server`.
164
163
@@ -167,7 +166,8 @@ When the corresponding models update, the Data Grid calls the `getRows` method w
@@ -187,9 +187,7 @@ Open info section of the browser console to see the requests being made and the
187
187
The data source caches fetched data by default.
188
188
This means that if the user navigates to a page or expands a node that has already been fetched, the grid will not call the `getRows` function again to avoid unnecessary calls to the server.
189
189
190
-
The `GridDataSourceCacheDefault` is used by default which is a simple in-memory cache that stores the data in a plain object. It can be seen in action in the demo below.
The `GridDataSourceCacheDefault` is used by default which is a simple in-memory cache that stores the data in a plain object. It can be seen in action in the [demo above](#with-data-source).
@@ -78,7 +78,7 @@ The demo below shows a toast apart from the default error message in the groupin
78
78
The idea behind the group expansion is the same as explained in the [Row grouping](/x/react-data-grid/row-grouping/#group-expansion) section.
79
79
The difference is that the data is not initially available and is fetched automatically after the Data Grid is mounted based on the props `defaultGroupingExpansionDepth` and `isGroupExpandedByDefault` in a waterfall manner.
80
80
81
-
The following demo uses `defaultGroupingExpansionDepth='-1'` to expand all levels of the tree by default.
81
+
The following demo uses `defaultGroupingExpansionDepth={-1}` to expand all levels of the tree by default.
0 commit comments