Skip to content

Commit

Permalink
feat(legi-shared): adding multiple attribute to select
Browse files Browse the repository at this point in the history
(cherry picked from commit 80765b6)
(cherry picked from commit 7f4301d)
  • Loading branch information
WilliamChelman committed Dec 27, 2024
1 parent f87f959 commit f6ad193
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/legi-shared/select/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<span *ngIf="(label || labelComponent) && classicMode" class="czls-title">{{ label }}<ng-content select="cz-label"></ng-content></span>
<mat-form-field [class.cz-classic-appearance]="classicMode">
<mat-label *ngIf="(label || labelComponent) && !classicMode">{{ label }}<ng-content select="cz-label"></ng-content></mat-label>
<mat-select [formControl]="embeddedControl" [placeholder]="placeholder" (selectionChange)="selectionChange.emit($event)">
<mat-select
[formControl]="embeddedControl"
[placeholder]="placeholder"
[multiple]="multiple"
(selectionChange)="selectionChange.emit($event)"
>
<mat-option *ngIf="canBeDiscarded">{{ 'global.none' | czTranslate }}</mat-option>
<mat-option
*ngFor="let option of options | selectOptionsSort: sortType"
Expand Down
2 changes: 2 additions & 0 deletions libs/legi-shared/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export class SelectComponent<T> extends ControlComponent<T> implements HasOption

@Input()
hint?: string;
@Input()
multiple: boolean = false;

@Output()
selectionChange: EventEmitter<unknown> = new EventEmitter();
Expand Down

0 comments on commit f6ad193

Please sign in to comment.