Fix disabled control
This commit is contained in:
parent
f327968d38
commit
06f59f6100
|
@ -47,7 +47,7 @@ export class AccessPolicySelectorComponent implements ControlValueAccessor, OnIn
|
||||||
item: ApItemViewType,
|
item: ApItemViewType,
|
||||||
) => {
|
) => {
|
||||||
// Disable entire row form group if readOnly
|
// Disable entire row form group if readOnly
|
||||||
if (item.readOnly) {
|
if (item.readOnly || this.disabled) {
|
||||||
controlRow.disable();
|
controlRow.disable();
|
||||||
} else {
|
} else {
|
||||||
controlRow.enable();
|
controlRow.enable();
|
||||||
|
@ -174,11 +174,11 @@ export class AccessPolicySelectorComponent implements ControlValueAccessor, OnIn
|
||||||
} else {
|
} else {
|
||||||
this.formGroup.enable();
|
this.formGroup.enable();
|
||||||
this.multiSelectFormGroup.enable();
|
this.multiSelectFormGroup.enable();
|
||||||
}
|
|
||||||
// The enable() above automatically enables all the row controls,
|
// The enable() above automatically enables all the row controls,
|
||||||
// so we need to disable the readonly ones again
|
// so we need to disable the readonly ones again
|
||||||
this.updateAllRowControlDisableStates();
|
this.updateAllRowControlDisableStates();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Required for NG_VALUE_ACCESSOR */
|
/** Required for NG_VALUE_ACCESSOR */
|
||||||
writeValue(selectedItems: ApItemValueType[]): void {
|
writeValue(selectedItems: ApItemValueType[]): void {
|
||||||
|
|
Loading…
Reference in New Issue