@acorex/platform 20.9.8 → 20.9.10

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.
@@ -593,7 +593,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
593
593
  const queryOptions = this.buildRegistryQueryOptions();
594
594
  const result = await this.registryDataSourceQuery.resolve(registryId, queryOptions);
595
595
  if (result.dataSource) {
596
- this.dataSource.set(result.dataSource);
596
+ this.dataSource.set(this.isolateRegistryDataSource(result.dataSource));
597
597
  }
598
598
  else {
599
599
  this.dataSource.set(convertArrayToDataSource([]));
@@ -645,6 +645,24 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
645
645
  };
646
646
  }
647
647
  //#endregion
648
+ /**
649
+ * Registry datasources are cached globally; each widget needs its own {@link AXDataSource}
650
+ * instance so per-widget filters (e.g. cascade parent id) do not leak across fields.
651
+ */
652
+ isolateRegistryDataSource(source) {
653
+ const config = source.config;
654
+ if (!config?.load) {
655
+ return source;
656
+ }
657
+ const originalLoad = config.load.bind(source);
658
+ const originalByKey = config.byKey?.bind(source);
659
+ return new AXDataSource({
660
+ pageSize: config.pageSize,
661
+ key: config.key,
662
+ load: (event) => originalLoad(event),
663
+ byKey: originalByKey ? (key) => originalByKey(key) : undefined,
664
+ });
665
+ }
648
666
  /** Invalidates cached registry datasource and forces a reload on the next effect run. */
649
667
  refreshRegistryDataSource() {
650
668
  const registryId = this.registryDataSourceName();