Skip to content

Commit 289524d

Browse files
committed
fix data adapter type
1 parent 32a82f9 commit 289524d

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

packages/cx/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cx",
3-
"version": "26.1.1",
3+
"version": "26.1.2",
44
"description": "Advanced JavaScript UI framework for admin and dashboard applications with ready to use grid, form and chart components.",
55
"exports": {
66
"./data": {
@@ -89,12 +89,12 @@
8989
"@types/node": "^25.0.3",
9090
"@types/react-dom": "^19.2.3",
9191
"@types/react-test-renderer": "^19.1.0",
92+
"cx-react": "workspace:*",
9293
"mocha": "^11.7.5",
9394
"react-test-renderer": "^19.2.3",
9495
"ts-mocha": "^11.1.0",
9596
"ts-node": "^10.9.2",
9697
"tsconfig-paths": "^4.2.0",
97-
"typescript": "^5.9.3",
98-
"cx-react": "workspace:*"
98+
"typescript": "^5.9.3"
9999
}
100-
}
100+
}

packages/cx/src/data/ArrayElementView.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { AugmentedViewBase } from "./AugmentedViewBase";
22
import { isArray } from "../util/isArray";
33
import { Binding } from "./Binding";
44
import { View } from "./View";
5+
import { RecordAlias } from "../ui/Prop";
56

67
export interface ArrayElementViewConfig {
78
store: View;
89
arrayAccessor: any;
910
immutable?: boolean;
10-
recordAlias?: string;
11-
indexAlias?: string;
12-
lengthAlias?: string;
11+
recordAlias?: RecordAlias;
12+
indexAlias?: RecordAlias;
13+
lengthAlias?: RecordAlias;
1314
hasNestedAliases?: boolean;
1415
recordBinding?: any;
1516
indexBinding?: any;

packages/cx/src/ui/adapter/DataAdapter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component } from "../../util/Component";
22
import { Instance } from "../Instance";
33
import { View } from "../../data/View";
44
import { RenderingContext } from "../RenderingContext";
5-
import { Sorter } from "../Prop";
5+
import { Sorter, RecordAlias } from "../Prop";
66

77
export type DataAdapterRecordType = "data" | "group-header" | "group-footer";
88

@@ -15,8 +15,8 @@ export interface DataAdapterRecord<T = any> {
1515
}
1616

1717
export interface DataAdapterConfig {
18-
recordName?: string;
19-
indexName?: string;
18+
recordName?: RecordAlias;
19+
indexName?: RecordAlias;
2020
immutable?: boolean;
2121
sealed?: boolean;
2222
}

0 commit comments

Comments
 (0)