From 161a3dc00e340e8afdb380b4b455bdc1533ef81d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Mon, 17 Oct 2022 14:14:43 +0200
Subject: [PATCH] refactor: select component: remove unused disabled flag

refs #483
---
 .../components/generic-select/generic-select.component.html   | 3 +--
 .../select-field-line/select-field-line.component.ts          | 4 ----
 src/app/formulaire/elements/select/select-field.ts            | 3 ---
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/app/components/generic-select/generic-select.component.html b/src/app/components/generic-select/generic-select.component.html
index 7ce918d76..0a75a714e 100644
--- a/src/app/components/generic-select/generic-select.component.html
+++ b/src/app/components/generic-select/generic-select.component.html
@@ -1,6 +1,5 @@
 <mat-form-field>
-    <mat-select [id]="selectId" [placeholder]="label" [(value)]="selectedValue" [multiple]="isMultiple"
-        [disabled]="isDisabled">
+    <mat-select [id]="selectId" [placeholder]="label" [(value)]="selectedValue" [multiple]="isMultiple">
         <mat-select-trigger *ngIf="isMultiple">
             {{ selectedValue && selectedValue[0] ? entryLabel(selectedValue[0]) : '' }}
             <span *ngIf="selectedValue?.length > 1" class="multiple-selection-label">
diff --git a/src/app/components/select-field-line/select-field-line.component.ts b/src/app/components/select-field-line/select-field-line.component.ts
index 2b8cb3a03..c6b2474a0 100644
--- a/src/app/components/select-field-line/select-field-line.component.ts
+++ b/src/app/components/select-field-line/select-field-line.component.ts
@@ -34,10 +34,6 @@ export class SelectFieldLineComponent implements OnInit {
         return this._select.multiple;
     }
 
-    public get isDisabled(): boolean {
-        return this._select.disabled;
-    }
-
     public get entries(): SelectEntry[] {
         if (! this._select) {
             return [];
diff --git a/src/app/formulaire/elements/select/select-field.ts b/src/app/formulaire/elements/select/select-field.ts
index c6e2024ed..e90449882 100644
--- a/src/app/formulaire/elements/select/select-field.ts
+++ b/src/app/formulaire/elements/select/select-field.ts
@@ -21,9 +21,6 @@ export abstract class SelectField extends Field {
     /** if true, user can select multiple values */
     protected _multiple = false;
 
-    /** if true, select box is grayed out */
-    public disabled = false;
-
     /** string to build the select entries IDs from */
     protected _entriesBaseId: string;
 
-- 
GitLab