Commit 84f0a9af authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

WIP: select all

parent 871ce3ab
......@@ -2,13 +2,13 @@
<div *ngFor="let category of getCategoryByFamily(outputFamily.id)" class="col-12 col-md-6 text-center">
{{ category.label }}
<br />
<div class="selectbox pt-1">
<!-- <button (click)="toggleSelectAll()" class="btn btn-block text-left py-0 m-0">
<div class="selectbox py-1">
<button (click)="toggleSelectAll()" class="btn btn-block text-left py-0 m-0">
<div *ngIf="isAllSelected; then selected else unselected"></div>
<span *ngIf="!isAllSelected">Select All</span>
<span *ngIf="isAllSelected">Unselect All</span>
</button>
<hr class="m-0"> -->
<hr class="my-1">
<button *ngFor="let attribute of getAttributeByCategory(category.id)"
class="btn btn-block text-left py-0 m-0" (click)="toggleSelection(attribute.id)">
<div *ngIf="isSelected(attribute.id); then selected else unselected"></div>
......
......@@ -29,7 +29,6 @@ export class OutputByFamilyComponent {
}
isSelected(id: number) {
console.log(this.outputList.filter(i => i === id));
return this.outputList.filter(i => i === id).length > 0;
}
......@@ -44,7 +43,7 @@ export class OutputByFamilyComponent {
this.changed.emit(clonedOutputList);
}
// toggleSelectAll(): void {
// this.isAllSelected = !this.isAllSelected;
// }
toggleSelectAll(): void {
this.isAllSelected = !this.isAllSelected;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment