@acorex/cdk 20.8.16 → 20.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/common/index.d.ts CHANGED
@@ -594,7 +594,7 @@ interface AXDataSourceCallbackResult<T> {
594
594
  total: number;
595
595
  }
596
596
  type AXDataSourceLoadCallback<T> = (e: AXDataSourceQuery) => Promise<AXDataSourceCallbackResult<T>>;
597
- type AXDataSourceByKeyCallback<T> = (key: unknown) => Promise<T>;
597
+ type AXDataSourceByKeyCallback<T> = (key: unknown) => T | Promise<T>;
598
598
  interface AXDataSourceConfig<T = unknown> {
599
599
  key?: string;
600
600
  pageSize: number;
@@ -1206,7 +1206,7 @@ function convertArrayToDataSource(items, options = { key: 'id', pageSize: 100 })
1206
1206
  total: resultNormalized.length,
1207
1207
  };
1208
1208
  },
1209
- byKey: async (v) =>
1209
+ byKey: (v) =>
1210
1210
  // Search in the normalized list (supports primitive and object arrays)
1211
1211
  normalizedItems.find((record) => {
1212
1212
  return record[options.key] == v;