@iapps/ng-dhis2-ui 1.2.116 → 1.2.118
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.
|
@@ -2919,6 +2919,7 @@ class OrganisationUnitSelectionConfig {
|
|
|
2919
2919
|
this.batchSize = params?.batchSize;
|
|
2920
2920
|
this.additionalQueryFields = params?.additionalQueryFields;
|
|
2921
2921
|
this.allowCaching = params?.allowCaching;
|
|
2922
|
+
this.rootOrgUnits = params?.rootOrgUnits;
|
|
2922
2923
|
}
|
|
2923
2924
|
}
|
|
2924
2925
|
|
|
@@ -3047,7 +3048,9 @@ class OrganisationUnitSelectorModalComponent extends ReactWrapperModule {
|
|
|
3047
3048
|
if (!this.elementRef)
|
|
3048
3049
|
throw new Error('No element ref');
|
|
3049
3050
|
this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);
|
|
3050
|
-
const rootOrgUnits =
|
|
3051
|
+
const rootOrgUnits = this.orgUnitSelectionConfig.rootOrgUnits && this.orgUnitSelectionConfig.rootOrgUnits.length > 0
|
|
3052
|
+
? this.orgUnitSelectionConfig.rootOrgUnits
|
|
3053
|
+
: await this.getRootOrgUnits();
|
|
3051
3054
|
const config = await this.getAppConfig();
|
|
3052
3055
|
if (config) {
|
|
3053
3056
|
this.component = () => {
|