From 8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0 Mon Sep 17 00:00:00 2001 From: Jelle Besseling Date: Tue, 12 Oct 2021 13:33:44 +0200 Subject: Allow configuration to be static/readonly (#4315) * Allow configuration to be static/readonly * Make all components disableable * Improve disabled component styling * Rename edits allowed field in configuration * Fix CI --- .../src/app/shared/shared-forms/select/select-options.component.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/src/app/shared/shared-forms/select/select-options.component.ts') diff --git a/client/src/app/shared/shared-forms/select/select-options.component.ts b/client/src/app/shared/shared-forms/select/select-options.component.ts index 8482b9dea..820a82c24 100644 --- a/client/src/app/shared/shared-forms/select/select-options.component.ts +++ b/client/src/app/shared/shared-forms/select/select-options.component.ts @@ -23,6 +23,7 @@ export class SelectOptionsComponent implements ControlValueAccessor { @Input() searchFn: any selectedId: number | string + disabled = false propagateChange = (_: any) => { /* empty */ } @@ -48,4 +49,8 @@ export class SelectOptionsComponent implements ControlValueAccessor { onModelChange () { this.propagateChange(this.selectedId) } + + setDisabledState (isDisabled: boolean) { + this.disabled = isDisabled + } } -- cgit v1.2.3