How can I select only one element per group within a multiple select? [ng-zorro and nz-option-group]

Viewed 501

I have a multiple select with several groups inside, thanks to nz-option-group. The problem is that I would like that although the select alone is multiple, it is possible to select an element for each group.


 <nz-select
            [formControl]="sortingGroupControl"
            nzAllowClear
            nzPlaceHolder="Choose"
            nzShowSearch
            nzMode="multiple"
            style="width: 70%"
          >
            <nz-option-group
              *ngFor="let item of sortItems"
              [nzLabel]="item.label"
            >
              <nz-option
                *ngFor="let value of item.groupItem"
                [nzValue]="value"
                [nzLabel]="value.order.label"
              ></nz-option>
            </nz-option-group>
          </nz-select>

A graphic example is this: example of multiple select

So i want select a field for Employee group, a select for Type Group etc.

Because now i can select more field for every group.

0 Answers
Related