I'm trying to achieve like this EXAMPLE in reusable table. But seems it is not working.
data-table.ts
export class DropdownOption {
filterOption : [];
}
@Input() control: FormControl;
@Input() options: DropdownOption[];
@Output() selectionChange = new EventEmitter<MatSelectChange>();
onSelectionChange(event) {
this.selectionChange.next(event);
}
target.component
<h3>table 1</h3>
<app-data-table [tableData]="tableData1" [columnHeader]="columnHeader1" (selectionChange)="onSelectionChange($event)"></app-data-table>
<h3>table 2</h3>
<app-data-table [tableData]="tableData2" [columnHeader]="columnHeader2"> </app-data-table>
</div>
Problem is:
i've add selectOption for 1st table only.. but its reflecting in my 2nd table also.
is my model correct
export class DropdownOption { filterOption : []; }
?