codexly-ui 0.10.23 → 0.10.24

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.
@@ -3854,7 +3854,10 @@ class ClxSelectComponent {
3854
3854
  _disabled = computed(() => this._cvaDisabled() || this.disabled() || !!this._cardDisabled?.(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
3855
3855
  _sizeConfig = computed(() => SELECT_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3856
3856
  _hasValue = computed(() => this._selectedVals().length > 0, ...(ngDevMode ? [{ debugName: "_hasValue" }] : /* istanbul ignore next */ []));
3857
- _isInvalid = computed(() => this._wasTouched() && (this._ngControl?.control?.invalid ?? false), ...(ngDevMode ? [{ debugName: "_isInvalid" }] : /* istanbul ignore next */ []));
3857
+ _isInvalid = computed(() => {
3858
+ this._selectedVals(); // re-evaluate control.invalid (imperatively updated by Angular Forms) on each selection change
3859
+ return this._wasTouched() && (this._ngControl?.control?.invalid ?? false);
3860
+ }, ...(ngDevMode ? [{ debugName: "_isInvalid" }] : /* istanbul ignore next */ []));
3858
3861
  _selectedOptions = computed(() => {
3859
3862
  const vals = this._selectedVals();
3860
3863
  return (this.options() ?? []).filter(o => vals.includes(o.value));