Skip to content

Commit

Permalink
feat: add multiselect databinding to observers
Browse files Browse the repository at this point in the history
Fix set value `this.multiSelect` (always true before fixing)

Add multiselect option to component `pnx-observers`

Remove useless databing input for component `pnx-observers-text`

Reviewed-by: andriac
  • Loading branch information
andriacap committed Sep 11, 2023
1 parent 6a64dab commit ec41144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,13 @@
[idMenu]="formDefComp['id_menu']"
[idList]="formDefComp['id_list']"
[codeList]="formDefComp['code_list']"
[multiSelect]="formDefComp['multi_select']"
>
</pnx-observers>

<pnx-observers-text
*ngSwitchCase="'observers-text'"
[label]="formDefComp['attribut_label']"
[multiSelect]="formDef.multi_select"
[clearable]="formDef.clearable"
[displayAll]="formDef.display_all"
[searchBar]="formDef.search_bar"
[parentFormControl]="form.get(formDefComp['attribut_name'])"
>
</pnx-observers-text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class ObserversComponent extends GenericFormComponent {

ngOnInit() {
this.bindValue = this.bindAllItem ? null : this.bindValue;
this.multiSelect = this.multiSelect || true;
this.multiSelect = this.multiSelect == undefined ? true : this.multiSelect;
// uniformise as IdList the id of list
// retrocompat: keep idMenu
if (this.idList) {
Expand Down

0 comments on commit ec41144

Please sign in to comment.