aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/select/select-options.component.ts
diff options
context:
space:
mode:
authorJelle Besseling <jelle@pingiun.com>2021-10-12 13:33:44 +0200
committerGitHub <noreply@github.com>2021-10-12 13:33:44 +0200
commit8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0 (patch)
tree755ba56bc3acbd82ec195974545581c1e49aae5e /client/src/app/shared/shared-forms/select/select-options.component.ts
parentbadacdbb4a3e4a1aae4d324abc496be8e261b2ef (diff)
downloadPeerTube-8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0.tar.gz
PeerTube-8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0.tar.zst
PeerTube-8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0.zip
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
Diffstat (limited to 'client/src/app/shared/shared-forms/select/select-options.component.ts')
-rw-r--r--client/src/app/shared/shared-forms/select/select-options.component.ts5
1 files changed, 5 insertions, 0 deletions
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 {
23 @Input() searchFn: any 23 @Input() searchFn: any
24 24
25 selectedId: number | string 25 selectedId: number | string
26 disabled = false
26 27
27 propagateChange = (_: any) => { /* empty */ } 28 propagateChange = (_: any) => { /* empty */ }
28 29
@@ -48,4 +49,8 @@ export class SelectOptionsComponent implements ControlValueAccessor {
48 onModelChange () { 49 onModelChange () {
49 this.propagateChange(this.selectedId) 50 this.propagateChange(this.selectedId)
50 } 51 }
52
53 setDisabledState (isDisabled: boolean) {
54 this.disabled = isDisabled
55 }
51} 56}