Skip to content

Commit 2f76621

Browse files
authored
Update column moving topic for React 19 (#1508)
1 parent c9fcee9 commit 2f76621

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/en/components/grids/_shared/column-moving.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public headerTemplate = (ctx: IgcCellTemplateContext) => {
4747
```
4848

4949
```tsx
50-
function headerTemplate(ctx: IgrCellTemplateContext) {
50+
const headerTemplate = (ctx: IgrCellTemplateContext) => {
5151
return (
5252
<>
53-
<IgrIcon draggable="false" onClick={onClick}></IgrIcon>
53+
<IgrIcon draggable={false} onClick={onClick}></IgrIcon>
5454
</>
5555
);
5656
}
@@ -85,7 +85,7 @@ function headerTemplate(ctx: IgrCellTemplateContext) {
8585

8686
<!-- React -->
8787
```tsx
88-
<{ComponentSelector} moving="true"></{ComponentSelector}>
88+
<{ComponentSelector} moving={true}></{ComponentSelector}>
8989
```
9090
<!-- end: React -->
9191

@@ -120,9 +120,9 @@ function headerTemplate(ctx: IgrCellTemplateContext) {
120120

121121
<!-- React -->
122122
```tsx
123-
<{ComponentSelector} moving="true">
123+
<{ComponentSelector} moving={true}>
124124
...
125-
<{RowIslandSelector} moving="true"></{RowIslandSelector}>
125+
<{RowIslandSelector} moving={true}></{RowIslandSelector}>
126126
</{ComponentSelector}>
127127
```
128128
<!-- end: React -->
@@ -212,15 +212,15 @@ public onColumnMovingEnd(event) {
212212

213213
<!-- ComponentStart: Grid, HierarchicalGrid -->
214214
```tsx
215-
function onColumnMovingEnd(grid: IgrGridBaseDirective, event: IgrColumnMovingEventArgs) {
215+
const onColumnMovingEnd = (event: IgrColumnMovingEndEventArgs) => {
216216
if (event.detail.source.field === "Category" && event.detail.target.field === "Change On Year(%)") {
217217
event.detail.cancel = true;
218218
}
219219
}
220220

221-
<{ComponentSelector} autoGenerate="false" moving="true" data={data} columnMovingEnd={onColumnMovingEnd}>
221+
<{ComponentSelector} autoGenerate={false} moving={true} data={data} onColumnMovingEnd={onColumnMovingEnd}>
222222
<IgrColumn field="Category"></IgrColumn>
223-
<IgrColumn field="Change On Year(%)" dataType="Number" ></IgrColumn>
223+
<IgrColumn field="Change On Year(%)" dataType="number"></IgrColumn>
224224
</{ComponentSelector}>
225225
```
226226
<!-- ComponentEnd: Grid, HierarchicalGrid -->

0 commit comments

Comments
 (0)