@abp/ng.theme.shared 5.3.1 → 6.0.0-rc.1

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.
@@ -415,12 +415,16 @@ class ExtensibleFormPropComponent {
415
415
  this.asterisk = '';
416
416
  this.options$ = of([]);
417
417
  this.validators = [];
418
+ this.disabledFn = (data) => false;
418
419
  this.search = (text$) => text$
419
420
  ? text$.pipe(debounceTime(300), distinctUntilChanged(), switchMap(text => this.prop.options(this.data, text)))
420
421
  : of([]);
421
422
  this.typeaheadFormatter = (option) => option.key;
422
423
  this.form = groupDirective.form;
423
424
  }
425
+ get disabled() {
426
+ return this.disabledFn(this.data);
427
+ }
424
428
  setTypeaheadValue(selectedOption) {
425
429
  this.typeaheadModel = selectedOption || { key: null, value: null };
426
430
  const { key, value } = this.typeaheadModel;
@@ -499,8 +503,9 @@ class ExtensibleFormPropComponent {
499
503
  this.options$ = options(this.data);
500
504
  if (readonly)
501
505
  this.readonly = readonly(this.data);
502
- if (disabled)
503
- this.disabled = disabled(this.data);
506
+ if (disabled) {
507
+ this.disabledFn = disabled;
508
+ }
504
509
  if (validators) {
505
510
  this.validators = validators(this.data);
506
511
  this.setAsterisk();