When the user hovers over the first column of the table , a tooltip comes up which has a button at the bottom.
On click of the button, angular mat-dialog opens up which has the first column data on the left hand side of the mat-dialog.
I need to achieve 2 things
1) On the left hand side of mat-dialog, mat-list-option should be selected by default depending on whichever row user hovered upon and clicked on its tooltip button.
2) The right hand side of the mat-dialog needs to be populated with "conditionals","offset","alert" property data related to mat-list-option selected on the left hand side.
Eg: In table user had hovered on 1 min data(under Alert column) and clicks on the button once the tooltip opens , in the mat-dialog 1 min data row should be selected and on right hand side its respective "conditionals","offset","alert" data should load , so accordingly depending on the selected mat-list-option its respective "conditionals" data should load.
I already have enforced only one mat-list-option can be selected at a time
alert-dialog.component.html
<div [ngStyle]="{'width':'50%','border':'1px solid yellow','margin-right':'15px','height':'100%'}">
<h3>LEFT</h3>
<div class="alert-select">
<mat-selection-list #preDefAlertList>
<mat-list-option *ngFor="let preDef of data.data" [value]="preDef">
{{preDef.Alert}}
</mat-list-option>
</mat-selection-list>
</div>
</div>
<div [ngStyle]="{'width':'100%','border':'1px solid red'}">
<h3>Edit JSON</h3>
<div class="makeEditable" contenteditable="true">
{{preDef.conditionals | json}}
</div>
</div>
tooltip-overview-example.component.ts has the table and data is being passed on to alert-dialog.component.ts once user clicks on the button present in tooltip.
Stackblitz link https://stackblitz.com/edit/angular-mat-tooltip-rzstlk?file=app%2Ftooltip-overview-example.ts