diff options
author | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-11-20 16:50:45 +0200 |
---|---|---|
committer | Einat Vinouze <einat.vinouze@intl.att.com> | 2019-11-26 12:41:29 +0200 |
commit | 091343aa4bbf1bd6b882e08113d90685c1c84ffe (patch) | |
tree | fbef4bda9987a59dff5109cf5cc401f95eb05068 /vid-webpack-master/src/app/shared/models | |
parent | ee6c513301200be38c3602a4c3084c2ff3bde10c (diff) |
Allow platform multi-selection for VNF in modern UI
Issue-ID: VID-722
Change-Id: Id87f59fff128e277d9158b83f3908754375c8b01
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/models')
-rw-r--r-- | vid-webpack-master/src/app/shared/models/formControlModels/multiselectFormControl.model.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vid-webpack-master/src/app/shared/models/formControlModels/multiselectFormControl.model.ts b/vid-webpack-master/src/app/shared/models/formControlModels/multiselectFormControl.model.ts index b13745104..09fc1d250 100644 --- a/vid-webpack-master/src/app/shared/models/formControlModels/multiselectFormControl.model.ts +++ b/vid-webpack-master/src/app/shared/models/formControlModels/multiselectFormControl.model.ts @@ -7,10 +7,13 @@ export class MultiselectFormControl extends FormControlModel{ options$ : Observable<any[]>; args : string[]; onInit: (data : MultiselectFormControl, form: FormGroup) => Observable<any>; - selectedItems : string; + selectedItems : any[]; onInitSelectedItems : string[]; + selectedFieldName : string; ngValue : string; settings: {}; + onInitSelectedField?: string[]; + convertOriginalDataToArray? : (values)=> void; constructor(data) { @@ -18,10 +21,13 @@ export class MultiselectFormControl extends FormControlModel{ this.type = FormControlType.MULTI_SELECT; this.options$ = data.options; this.onInit = data.onInit; - this.selectedItems = data.selectedItems; + this.selectedItems = data.selectedItems || []; this.onInitSelectedItems = data.onInitSelectedItems ? data.onInitSelectedItems : null; this.ngValue = data.selectedField ? data.selectedField : 'id'; + this.selectedFieldName = data.selectedFieldName; this.settings = data.settings || {}; + this.onInitSelectedField = data.onInitSelectedField ? data.onInitSelectedField : null; + this.convertOriginalDataToArray = data.convertOriginalDataToArray ? data.convertOriginalDataToArray : null } } |