-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
1 parent
91a4dda
commit 3a0af05
Showing
19 changed files
with
637 additions
and
58 deletions.
There are no files selected for viewing
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
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
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
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
35 changes: 35 additions & 0 deletions
35
docs/src/pages/components/data-grid/columns/ColumnSizing.js
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,35 @@ | ||
import React from 'react'; | ||
import Chance from 'chance'; | ||
import DataGrid from '@material-ui/lab/DataGrid'; | ||
|
||
const chance = new Chance(); | ||
|
||
const data = Array.from(new Array(200)).map(() => ({ | ||
Country: chance.country(), | ||
Area: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
Population_Urban: chance.floating({ min: 0, max: 1 }), | ||
Population_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Agriculture: chance.floating({ min: 0, max: 1 }), | ||
GDP_Industry: chance.floating({ min: 0, max: 1 }), | ||
GDP_Services: chance.floating({ min: 0, max: 1 }), | ||
})); | ||
|
||
export default function ColumnGroups() { | ||
return ( | ||
<DataGrid | ||
style={{ maxHeight: 300, width: '100%' }} | ||
columns={[ | ||
{ field: 'Country', label: 'Country' }, | ||
{ field: 'Area', label: 'Area, sq. km.' }, | ||
{ field: 'Population_Total', label: 'Population Total' }, | ||
{ field: 'Population_Urban', label: 'Population Urban' }, | ||
{ field: 'GDP_Total', label: 'GDP Total' }, | ||
{ field: 'GDP_Agriculture', label: 'GDP Agriculture' }, | ||
{ field: 'GDP_Industry', label: 'GDP Industry' }, | ||
{ field: 'GDP_Services', label: 'GDP Services' }, | ||
]} | ||
rowsData={data} | ||
/> | ||
); | ||
} |
35 changes: 35 additions & 0 deletions
35
docs/src/pages/components/data-grid/columns/ColumnSizing.tsx
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,35 @@ | ||
import React from 'react'; | ||
import Chance from 'chance'; | ||
import DataGrid from '@material-ui/lab/DataGrid'; | ||
|
||
const chance = new Chance(); | ||
|
||
const data = Array.from(new Array(200)).map(() => ({ | ||
Country: chance.country(), | ||
Area: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
Population_Urban: chance.floating({ min: 0, max: 1 }), | ||
Population_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Agriculture: chance.floating({ min: 0, max: 1 }), | ||
GDP_Industry: chance.floating({ min: 0, max: 1 }), | ||
GDP_Services: chance.floating({ min: 0, max: 1 }), | ||
})); | ||
|
||
export default function ColumnGroups() { | ||
return ( | ||
<DataGrid | ||
style={{ maxHeight: 300, width: '100%' }} | ||
columns={[ | ||
{ field: 'Country', label: 'Country' }, | ||
{ field: 'Area', label: 'Area, sq. km.' }, | ||
{ field: 'Population_Total', label: 'Population Total' }, | ||
{ field: 'Population_Urban', label: 'Population Urban' }, | ||
{ field: 'GDP_Total', label: 'GDP Total' }, | ||
{ field: 'GDP_Agriculture', label: 'GDP Agriculture' }, | ||
{ field: 'GDP_Industry', label: 'GDP Industry' }, | ||
{ field: 'GDP_Services', label: 'GDP Services' }, | ||
]} | ||
rowsData={data} | ||
/> | ||
); | ||
} |
35 changes: 35 additions & 0 deletions
35
docs/src/pages/components/data-grid/columns/ColumnSticky.js
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,35 @@ | ||
import React from 'react'; | ||
import Chance from 'chance'; | ||
import DataGrid from '@material-ui/lab/DataGrid'; | ||
|
||
const chance = new Chance(); | ||
|
||
const data = Array.from(new Array(200)).map(() => ({ | ||
Country: chance.country(), | ||
Area: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
Population_Urban: chance.floating({ min: 0, max: 1 }), | ||
Population_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Agriculture: chance.floating({ min: 0, max: 1 }), | ||
GDP_Industry: chance.floating({ min: 0, max: 1 }), | ||
GDP_Services: chance.floating({ min: 0, max: 1 }), | ||
})); | ||
|
||
export default function ColumnGroups() { | ||
return ( | ||
<DataGrid | ||
style={{ maxHeight: 300, width: '100%' }} | ||
columns={[ | ||
{ field: 'Country', label: 'Country' }, | ||
{ field: 'Area', label: 'Area, sq. km.' }, | ||
{ field: 'Population_Total', label: 'Population Total' }, | ||
{ field: 'Population_Urban', label: 'Population Urban' }, | ||
{ field: 'GDP_Total', label: 'GDP Total' }, | ||
{ field: 'GDP_Agriculture', label: 'GDP Agriculture' }, | ||
{ field: 'GDP_Industry', label: 'GDP Industry' }, | ||
{ field: 'GDP_Services', label: 'GDP Services' }, | ||
]} | ||
rowsData={data} | ||
/> | ||
); | ||
} |
35 changes: 35 additions & 0 deletions
35
docs/src/pages/components/data-grid/columns/ColumnSticky.tsx
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,35 @@ | ||
import React from 'react'; | ||
import Chance from 'chance'; | ||
import DataGrid from '@material-ui/lab/DataGrid'; | ||
|
||
const chance = new Chance(); | ||
|
||
const data = Array.from(new Array(200)).map(() => ({ | ||
Country: chance.country(), | ||
Area: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
Population_Urban: chance.floating({ min: 0, max: 1 }), | ||
Population_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Agriculture: chance.floating({ min: 0, max: 1 }), | ||
GDP_Industry: chance.floating({ min: 0, max: 1 }), | ||
GDP_Services: chance.floating({ min: 0, max: 1 }), | ||
})); | ||
|
||
export default function ColumnGroups() { | ||
return ( | ||
<DataGrid | ||
style={{ maxHeight: 300, width: '100%' }} | ||
columns={[ | ||
{ field: 'Country', label: 'Country' }, | ||
{ field: 'Area', label: 'Area, sq. km.' }, | ||
{ field: 'Population_Total', label: 'Population Total' }, | ||
{ field: 'Population_Urban', label: 'Population Urban' }, | ||
{ field: 'GDP_Total', label: 'GDP Total' }, | ||
{ field: 'GDP_Agriculture', label: 'GDP Agriculture' }, | ||
{ field: 'GDP_Industry', label: 'GDP Industry' }, | ||
{ field: 'GDP_Services', label: 'GDP Services' }, | ||
]} | ||
rowsData={data} | ||
/> | ||
); | ||
} |
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
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,38 @@ | ||
import React from 'react'; | ||
import Chance from 'chance'; | ||
import DataGrid from '@material-ui/lab/DataGrid'; | ||
|
||
const chance = new Chance(); | ||
|
||
const data = Array.from(new Array(200)).map(() => ({ | ||
Country: chance.country(), | ||
Area: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
Population_Urban: chance.floating({ min: 0, max: 1 }), | ||
Population_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Agriculture: chance.floating({ min: 0, max: 1 }), | ||
GDP_Industry: chance.floating({ min: 0, max: 1 }), | ||
GDP_Services: chance.floating({ min: 0, max: 1 }), | ||
})); | ||
|
||
const columns = [ | ||
{ field: 'Country', label: 'Country' }, | ||
{ field: 'Area', label: 'Area, sq. km.' }, | ||
{ field: 'Population_Total', label: 'Population Total' }, | ||
{ field: 'Population_Urban', label: 'Population Urban' }, | ||
{ field: 'GDP_Total', label: 'GDP Total' }, | ||
{ field: 'GDP_Agriculture', label: 'GDP Agriculture' }, | ||
{ field: 'GDP_Industry', label: 'GDP Industry' }, | ||
{ field: 'GDP_Services', label: 'GDP Services' }, | ||
]; | ||
|
||
export default function ColumnGroups() { | ||
return ( | ||
<DataGrid | ||
style={{ maxHeight: 300, width: '100%' }} | ||
columns={columns} | ||
rowsData={data} | ||
defaultColumnOptions={{ sortable: true }} | ||
/> | ||
); | ||
} |
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,38 @@ | ||
import React from 'react'; | ||
import Chance from 'chance'; | ||
import DataGrid from '@material-ui/lab/DataGrid'; | ||
|
||
const chance = new Chance(); | ||
|
||
const data = Array.from(new Array(200)).map(() => ({ | ||
Country: chance.country(), | ||
Area: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
Population_Urban: chance.floating({ min: 0, max: 1 }), | ||
Population_Total: chance.integer({ min: 10e3, max: 10e6 }), | ||
GDP_Agriculture: chance.floating({ min: 0, max: 1 }), | ||
GDP_Industry: chance.floating({ min: 0, max: 1 }), | ||
GDP_Services: chance.floating({ min: 0, max: 1 }), | ||
})); | ||
|
||
const columns = [ | ||
{ field: 'Country', label: 'Country' }, | ||
{ field: 'Area', label: 'Area, sq. km.' }, | ||
{ field: 'Population_Total', label: 'Population Total' }, | ||
{ field: 'Population_Urban', label: 'Population Urban' }, | ||
{ field: 'GDP_Total', label: 'GDP Total' }, | ||
{ field: 'GDP_Agriculture', label: 'GDP Agriculture' }, | ||
{ field: 'GDP_Industry', label: 'GDP Industry' }, | ||
{ field: 'GDP_Services', label: 'GDP Services' }, | ||
]; | ||
|
||
export default function ColumnGroups() { | ||
return ( | ||
<DataGrid | ||
style={{ maxHeight: 300, width: '100%' }} | ||
columns={columns} | ||
rowsData={data} | ||
defaultColumnOptions={{ sortable: true }} | ||
/> | ||
); | ||
} |
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
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
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
Oops, something went wrong.