Merge branch 'feature/TV-847-checkbox-implementation' into develop

This commit is contained in:
Daniel Appelgren
2021-12-17 14:30:27 +01:00
17 changed files with 56 additions and 109 deletions

View File

@@ -14,12 +14,12 @@
class="multiselect-panel__checkboxes-item"
*ngFor="let multiselectOption of availableOptions; let i = index"
>
<digi-ng-form-checkbox
[afLabel]="multiselectOption.label + ' (' + (multiselectOption.count || 0) + ')'"
(change)="setOptionState(multiselectOption, $event.target.checked)"
<ui-checkbox
[ngModel]="isSelected(multiselectOption)"
[uiLabel]="multiselectOption.label + ' (' + (multiselectOption.count || 0) + ')'"
[name]="multiselectOption.id"
></digi-ng-form-checkbox>
(uiOnChange)="setOptionState(multiselectOption, $event)"
></ui-checkbox>
</li>
<ng-container *ngIf="selectedUnavailableOptions.length">
<li
@@ -27,13 +27,13 @@
[ngClass]="{'multiselect-panel__checkboxes-item--unavailable': i === 0}"
*ngFor="let multiselectOption of selectedUnavailableOptions; let i = index"
>
<digi-ng-form-checkbox
[afLabel]="multiselectOption.label + ' (0)'"
(change)="setOptionState(multiselectOption, $event.target.checked)"
<ui-checkbox
[ngModel]="isSelected(multiselectOption)"
[uiLabel]="multiselectOption.label + ' (0)'"
[uiSecondary]="true"
[name]="multiselectOption.id"
[afSecondary]="true"
></digi-ng-form-checkbox>
(uiOnChange)="setOptionState(multiselectOption, $event)"
></ui-checkbox>
</li>
</ng-container>
</ul>

View File

@@ -3,13 +3,14 @@ import { A11yModule } from '@angular/cdk/a11y';
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { UiCheckboxModule } from '@ui/checkbox/checkbox.module';
import { MultiselectComponent } from '@ui/multiselect/multiselect.component';
import { MultiselectPanelComponent } from './multiselect-panel/multiselect-panel.component';
import { UiOverlayModule } from '@ui/overlay/overlay.module';
import { MultiselectPanelComponent } from './multiselect-panel/multiselect-panel.component';
@NgModule({
declarations: [MultiselectComponent, MultiselectPanelComponent],
imports: [CommonModule, A11yModule, DigiNgFormCheckboxModule, FormsModule, UiOverlayModule],
imports: [CommonModule, A11yModule, DigiNgFormCheckboxModule, FormsModule, UiOverlayModule, UiCheckboxModule],
exports: [MultiselectComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})