Reputation: 31
On mat-select value change, want to pass some flag to another column or want to add custom content next column of same row using angular.
<mat-select style="min-width: 150px;"
[(ngModel)]="data.selected_value"
name="configtableDropdown"
(selectionChange)="selection($event, data)">
<mat-option *ngFor="let dropdownValue of data.values" [value]="dropdownValue">
{{dropdownValue}}
</mat-option>
</mat-select>
</mat-form-field>
Upvotes: 1
Views: 47
Reputation: 57986
Whatever you want to add add in the data object data
, assume the property name is someFlag
, now in the next column, you can reference data.someFlag
and conditionally show content.
@if(data.someFlag) {
true value HTML
} @else {
false value HTML
}
Upvotes: 0