Skip to content

Commit 93a9c92

Browse files
authored
Merge pull request #10 from brYch97/users/dominik.brych/FixHardcodedClientApi
Add ClientApi properties to IInputs and update dataset initialization
2 parents e455ab8 + 1487230 commit 93a9c92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/utils/dataset/adapters/VirtualDatasetAdapter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ interface IInputs {
3737
SelectableRows?: ComponentFramework.PropertyTypes.EnumProperty<"none" | "single" | "multiple">;
3838
GroupingType?: ComponentFramework.PropertyTypes.EnumProperty<"nested" | "flat">;
3939
IsLocalHarnessDebugMode?: ComponentFramework.PropertyTypes.EnumProperty<"true" | "false">;
40+
ClientApiWebresourceName?: ComponentFramework.PropertyTypes.StringProperty;
41+
ClientApiFunctionName?: ComponentFramework.PropertyTypes.StringProperty;
4042
}
4143

4244
interface IVirtualDatasetAdapterOptions {
@@ -222,10 +224,10 @@ export class VirtualDatasetAdapter {
222224
},
223225
IsLocalHarnessDebugMode: this._context.parameters.IsLocalHarnessDebugMode,
224226
ClientApiWebresourceName: {
225-
raw: 'talxis_gridclientapidemo'
227+
raw: this._context.parameters.ClientApiWebresourceName?.raw ?? null
226228
},
227229
ClientApiFunctionName: {
228-
raw: 'onDatasetControlInitialized'
230+
raw: this._context.parameters.ClientApiFunctionName?.raw ?? null
229231
}
230232
}
231233
}

0 commit comments

Comments
 (0)