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