Skip to content

Commit

Permalink
revert common features
Browse files Browse the repository at this point in the history
  • Loading branch information
nstepien committed Aug 23, 2023
1 parent b95ddec commit fc5af65
Showing 1 changed file with 26 additions and 52 deletions.
78 changes: 26 additions & 52 deletions website/demos/CommonFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import DataGrid, {
SelectCellFormatter,
SelectColumn,
textEditor,
type ColumnOrColumnGroup,
type Column,
type SortColumn
} from '../../src';
import { textEditorClassname } from '../../src/editors/textEditor';
Expand Down Expand Up @@ -74,7 +74,7 @@ interface Row {
function getColumns(
countries: readonly string[],
direction: Direction
): readonly ColumnOrColumnGroup<Row, SummaryRow>[] {
): readonly Column<Row, SummaryRow>[] {
return [
SelectColumn,
{
Expand All @@ -87,40 +87,24 @@ function getColumns(
}
},
{
name: 'My Group',
children: [
{
key: 'title',
name: 'Task',
frozen: true,
renderEditCell: textEditor,
renderSummaryCell({ row }) {
return `${row.totalCount} records`;
}
},
{
key: 'client',
name: 'Client',
width: 'max-content',
renderEditCell: textEditor
}
]
key: 'title',
name: 'Task',
frozen: true,
renderEditCell: textEditor,
renderSummaryCell({ row }) {
return `${row.totalCount} records`;
}
},
{ name: 'empty', children: [{ name: 'empty', children: [{ name: 'empty', children: [] }] }] },
{
name: 'Second group',
children: [
{
name: 'Sub-group',
children: [
{
key: 'area',
name: 'Area',
renderEditCell: textEditor
}
]
}
]
key: 'client',
name: 'Client',
width: 'max-content',
renderEditCell: textEditor
},
{
key: 'area',
name: 'Area',
renderEditCell: textEditor
},
{
key: 'country',
Expand All @@ -139,24 +123,14 @@ function getColumns(
)
},
{
name: 'Some other group',
children: [
{
name: 'Sub-group',
children: [
{
key: 'contact',
name: 'Contact',
renderEditCell: textEditor
}
]
},
{
key: 'assignee',
name: 'Assignee',
renderEditCell: textEditor
}
]
key: 'contact',
name: 'Contact',
renderEditCell: textEditor
},
{
key: 'assignee',
name: 'Assignee',
renderEditCell: textEditor
},
{
key: 'progress',
Expand Down

0 comments on commit fc5af65

Please sign in to comment.