Currently, I have a dropdown list with a filter for IN
and OUT
values. The functionality is working as expected:
<select class="form-select" style="max-width: 100px" [ngModel]="selectedBrand" (ngModelChange)="onChangeType($event)">
<option [value]="'IN'">IN</option>
<option [value]="'OUT'">OUT</option>
</select>
In my TypeScript file:
public selectedBrand: any;
public onChangeType(type: any) {
this.selectedBrand = type;
console.log(this.selectedBrand);
this.filteredCustomer = this.customerTransferts.filter(
(item) => item.type === this.selectedBrand
);
console.log(this.filteredCustomer);
}
Now, I want to enhance the functionality by adding a SELECT ALL
option to display all elements of either IN
or OUT
.
I'm seeking guidance on what modifications are needed in my code to achieve this.
Thank you in advance for your assistance.