@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.
- package/fesm2022/acorex-platform-common.mjs +18 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +214 -6
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +72 -47
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +34 -29
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +19 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +145 -22
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +6 -0
- package/types/acorex-platform-layout-components.d.ts +44 -5
- package/types/acorex-platform-layout-entity.d.ts +4 -2
- package/types/acorex-platform-layout-widget-core.d.ts +5 -0
- package/types/acorex-platform-layout-widgets.d.ts +34 -0
|
@@ -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();
|