Skip to content

Commit 7b0e408

Browse files
Copilotdamyanpetev
andcommitted
Add explicit initial state for dynamic column properties
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
1 parent 8c75cc7 commit 7b0e408

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

  • samples/grids/grid-lite/column-config-dynamic/src

samples/grids/grid-lite/column-config-dynamic/src/index.tsx

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,42 @@ export default class Sample extends React.Component<any, any> {
3737
{
3838
field: 'id',
3939
hidden: true,
40-
header: 'ID'
40+
header: 'ID',
41+
resizable: true,
42+
sortable: false,
43+
filterable: false
4144
},
4245
{
4346
field: 'name',
44-
header: 'Product Name'
47+
header: 'Product Name',
48+
resizable: true,
49+
sortable: false,
50+
filterable: false
4551
},
4652
{
4753
field: 'price',
4854
header: 'Price',
4955
dataType: 'number',
50-
cellTemplate: this.format
56+
cellTemplate: this.format,
57+
resizable: true,
58+
sortable: false,
59+
filterable: false
5160
},
5261
{
5362
field: 'sold',
5463
dataType: 'number',
55-
header: 'Units sold'
64+
header: 'Units sold',
65+
resizable: true,
66+
sortable: false,
67+
filterable: false
5668
},
5769
{
5870
field: 'total',
5971
header: 'Total sold',
60-
cellTemplate: this.format
72+
cellTemplate: this.format,
73+
resizable: true,
74+
sortable: false,
75+
filterable: false
6176
},
6277
{
6378
field: 'rating',
@@ -69,7 +84,10 @@ export default class Sample extends React.Component<any, any> {
6984
rating.setAttribute('step', '0.01');
7085
rating.setAttribute('value', params.value.toString());
7186
return rating;
72-
}
87+
},
88+
resizable: true,
89+
sortable: false,
90+
filterable: false
7391
}
7492
];
7593

0 commit comments

Comments
 (0)