forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename structure and try to implement a loader for demo tag
- Loading branch information
1 parent
2a9ec80
commit 930d31d
Showing
39 changed files
with
551 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import * as React from 'react'; | ||
import TopLayoutSurvey from 'docs/src/modules/components/TopLayoutSurvey'; | ||
import { docs } from './developer-survey-impacts.md?@mui/markdown'; | ||
|
||
export default function Page() { | ||
return <TopLayoutSurvey docs={docs} />; | ||
} |
80 changes: 41 additions & 39 deletions
80
...ges/blog/2022-developer-survey-results.md → docs/pages/blog/developer-survey-impacts.md
Large diffs are not rendered by default.
Oops, something went wrong.
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,66 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import { | ||
DataGridPremium, | ||
GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, | ||
GridToolbar, | ||
useGridApiRef, | ||
useKeepGroupedColumnsHidden, | ||
} from '@mui/x-data-grid-premium'; | ||
import { useDemoData } from '@mui/x-data-grid-generator'; | ||
|
||
const visibleFields = [ | ||
'commodity', | ||
'quantity', | ||
'filledQuantity', | ||
'status', | ||
'isFilled', | ||
'unitPrice', | ||
'unitPriceCurrency', | ||
'subTotal', | ||
'feeRate', | ||
'feeAmount', | ||
'incoTerm', | ||
]; | ||
|
||
export default function DataGridPremiumDemo() { | ||
const { data, loading } = useDemoData({ | ||
dataSet: 'Commodity', | ||
rowLength: 100, | ||
editable: true, | ||
visibleFields, | ||
}); | ||
const apiRef = useGridApiRef(); | ||
|
||
const initialState = useKeepGroupedColumnsHidden({ | ||
apiRef, | ||
initialState: { | ||
...data.initialState, | ||
rowGrouping: { | ||
...data.initialState?.rowGrouping, | ||
model: ['commodity'], | ||
}, | ||
sorting: { | ||
sortModel: [{ field: GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, sort: 'asc' }], | ||
}, | ||
aggregation: { | ||
model: { | ||
quantity: 'sum', | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
return ( | ||
<Box sx={{ height: 520, width: '100%' }}> | ||
<DataGridPremium | ||
{...data} | ||
apiRef={apiRef} | ||
loading={loading} | ||
disableRowSelectionOnClick | ||
initialState={initialState} | ||
slots={{ toolbar: GridToolbar }} | ||
/> | ||
</Box> | ||
); | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.