-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/accessibility/DensitySelectorGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
{...data} | ||
components={{ | ||
Toolbar: CustomToolbar, | ||
}} | ||
/> |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/data-grid/accessibility/DensitySelectorSmallGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<DataGrid | ||
{...data} | ||
density="compact" | ||
components={{ | ||
Toolbar: CustomToolbar, | ||
}} | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/columns/ColumnMenuGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid {...data} disableColumnMenu /> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/columns/ColumnOrderingGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGridPro {...data} /> |
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/columns/ColumnSelectorGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
{...data} | ||
components={{ | ||
Toolbar: GridToolbar, | ||
}} | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/columns/RenderHeaderGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid rows={rows} columns={columns} /> |
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/components/CustomToolbarGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
{...data} | ||
components={{ | ||
Toolbar: CustomToolbar, | ||
}} | ||
/> |
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/components/ToolbarGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
{...data} | ||
components={{ | ||
Toolbar: GridToolbar, | ||
}} | ||
/> |
8 changes: 8 additions & 0 deletions
8
docs/src/pages/components/data-grid/events/DoubleClickWithCtrlToEdit.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<DataGrid | ||
onCellDoubleClick={(params, event) => { | ||
if (!event.ctrlKey) { | ||
event.defaultMuiPrevented = true; | ||
} | ||
}} | ||
{...data} | ||
/> |
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/export/ExportSelectorGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
{...data} | ||
components={{ | ||
Toolbar: CustomToolbar, | ||
}} | ||
/> |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/data-grid/filtering/DisableFilteringGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<DataGrid | ||
{...data} | ||
columns={data.columns.map((column) => ({ | ||
...column, | ||
filterable: false, | ||
}))} | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/filtering/FilterOperators.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid rows={data.rows} columns={columns} /> |
5 changes: 5 additions & 0 deletions
5
docs/src/pages/components/data-grid/filtering/MultiFilteringGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<DataGridPro | ||
{...data} | ||
filterModel={filterModel} | ||
onFilterModelChange={(model) => setFilterModel(model)} | ||
/> |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/data-grid/filtering/ServerFilterGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<DataGrid | ||
rows={rows} | ||
columns={columns} | ||
filterMode="server" | ||
onFilterModelChange={onFilterChange} | ||
loading={loading} | ||
/> |
2 changes: 2 additions & 0 deletions
2
docs/src/pages/components/data-grid/layout/AutoHeightGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<DataGrid autoHeight {...data} /> | ||
<p>more content</p> |
3 changes: 3 additions & 0 deletions
3
docs/src/pages/components/data-grid/layout/FixedSizeGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div style={{ height: 350, width: '100%' }}> | ||
<DataGrid {...data} /> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
docs/src/pages/components/data-grid/layout/FlexLayoutGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div style={{ display: 'flex', height: '100%' }}> | ||
<div style={{ flexGrow: 1 }}> | ||
<DataGrid {...data} /> | ||
</div> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
docs/src/pages/components/data-grid/localization/CustomLocaleTextGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<DataGrid | ||
{...data} | ||
localeText={{ | ||
toolbarDensity: 'Size', | ||
toolbarDensityLabel: 'Size', | ||
toolbarDensityCompact: 'Small', | ||
toolbarDensityStandard: 'Medium', | ||
toolbarDensityComfortable: 'Large', | ||
}} | ||
components={{ | ||
Toolbar: GridToolbar, | ||
}} | ||
/> |
8 changes: 8 additions & 0 deletions
8
docs/src/pages/components/data-grid/overview/DataGridDemo.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<DataGrid | ||
rows={rows} | ||
columns={columns} | ||
pageSize={5} | ||
rowsPerPageOptions={[5]} | ||
checkboxSelection | ||
disableSelectionOnClick | ||
/> |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/data-grid/overview/DataGridProDemo.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<DataGridPro | ||
{...data} | ||
loading={data.rows.length === 0} | ||
rowHeight={38} | ||
checkboxSelection | ||
disableSelectionOnClick | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/pagination/200PaginationGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGridPro pagination pageSize={200} rowsPerPageOptions={[200]} {...data} /> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/pagination/AutoPaginationGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid autoPageSize pagination {...data} /> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/pagination/BasicPaginationGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid pagination {...data} /> |
8 changes: 8 additions & 0 deletions
8
docs/src/pages/components/data-grid/pagination/ControlledPaginationGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<DataGrid | ||
page={page} | ||
onPageChange={(newPage) => setPage(newPage)} | ||
pageSize={5} | ||
rowsPerPageOptions={[5]} | ||
pagination | ||
{...data} | ||
/> |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/data-grid/pagination/SizePaginationGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<DataGrid | ||
pageSize={pageSize} | ||
onPageSizeChange={(newPageSize) => setPageSize(newPageSize)} | ||
rowsPerPageOptions={[5, 10, 20]} | ||
pagination | ||
{...data} | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/rows/ApiRefRowsGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGridPro rows={rows} columns={columns} apiRef={apiRef} /> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/rows/DenseHeightGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid rowHeight={25} {...data} /> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/selection/CheckboxSelectionGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid checkboxSelection {...data} /> |
8 changes: 8 additions & 0 deletions
8
docs/src/pages/components/data-grid/selection/ControlledSelectionGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<DataGrid | ||
checkboxSelection | ||
onSelectionModelChange={(newSelectionModel) => { | ||
setSelectionModel(newSelectionModel); | ||
}} | ||
selectionModel={selectionModel} | ||
{...data} | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/selection/DisableClickSelectionGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid checkboxSelection disableSelectionOnClick {...data} /> |
5 changes: 5 additions & 0 deletions
5
docs/src/pages/components/data-grid/selection/DisableRowSelection.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<DataGrid | ||
{...data} | ||
isRowSelectable={(params: GridRowParams) => params.row.quantity > 50000} | ||
checkboxSelection | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/selection/SingleRowSelectionGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid {...data} /> |
5 changes: 5 additions & 0 deletions
5
docs/src/pages/components/data-grid/sorting/BasicSortingGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<DataGrid | ||
{...data} | ||
sortModel={sortModel} | ||
onSortModelChange={(model) => setSortModel(model)} | ||
/> |
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/sorting/ComparatorSortingGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
sortModel={sortModel} | ||
rows={rows} | ||
columns={columns} | ||
onSortModelChange={(model) => setSortModel(model)} | ||
/> |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/data-grid/sorting/DisableSortingGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<DataGrid | ||
{...data} | ||
columns={data.columns.map((column) => ({ | ||
...column, | ||
sortable: false, | ||
}))} | ||
/> |
5 changes: 5 additions & 0 deletions
5
docs/src/pages/components/data-grid/sorting/MultiSortingGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<DataGridPro | ||
{...data} | ||
sortModel={sortModel} | ||
onSortModelChange={(model) => setSortModel(model)} | ||
/> |
6 changes: 6 additions & 0 deletions
6
docs/src/pages/components/data-grid/sorting/OrderSortingGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<DataGrid | ||
sortingOrder={['desc', 'asc']} | ||
sortModel={sortModel} | ||
onSortModelChange={(model) => setSortModel(model)} | ||
{...data} | ||
/> |
1 change: 1 addition & 0 deletions
1
docs/src/pages/components/data-grid/style/StylingHeaderGrid.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<DataGrid rows={rows} columns={columns} /> |