Fix disabled control

This commit is contained in:
Thomas Avery 2024-04-02 12:26:08 -05:00
parent f327968d38
commit 06f59f6100
No known key found for this signature in database
GPG Key ID: A60B3C6A4F4EC228
1 changed files with 4 additions and 4 deletions

View File

@ -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,10 +174,10 @@ 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();
}
// 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 */