@iapps/ng-dhis2-ui 1.2.162 → 1.2.163

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.
@@ -8956,10 +8956,16 @@ class BaseFormFieldComponent extends ReactWrapperModule {
8956
8956
  const [checkingUniqueness, setCheckingUniqueness] = useState(false);
8957
8957
  useEffect(() => {
8958
8958
  const sub = this.programRuleOptions$.subscribe((options) => {
8959
+ if (!options)
8960
+ return;
8961
+ if (field.controlType !== 'dropdown' &&
8962
+ field.controlType !== 'multi-dropdown') {
8963
+ return;
8964
+ }
8959
8965
  const cascade = this.#resolveCascadeForCurrentField();
8960
8966
  if (cascade?.kind === 'OPTIONS_PATH')
8961
8967
  return;
8962
- const nextOptions = options ?? this.field().options ?? [];
8968
+ const nextOptions = options;
8963
8969
  setFilteredOptions(nextOptions);
8964
8970
  const currentCtrl = this.#getCurrentFieldControl(fg);
8965
8971
  const currentValue = String(currentCtrl?.value ?? '').trim();