我创建了一个表格,其中包含使用有角材料的标签和表格下方的框。
当用户单击表中的一个值时,该框下方的框应该被启用并向下滚动到该框所在的底部页面
我只是使用了在 JS 中完成的所有可能方式,但没有一个效果很好
我试过这个http://plnkr.co/edit/qIMIhIhqPymICTe0uzSh?p=preview
下面是表格,点击第一个值时,应该触发该框
<mat-tab-group (selectedTabChange) = "openState($event)">
<mat-tab label="Closed Meetings">
<mat-form-field id="filter">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
<table mat-table [dataSource]="this.dataSource" class="mat-elevation-z8">
<ng-container matColumnDef="resource_name">
<th mat-header-cell *matHeaderCellDef>Resource Name</th>
<td id="resurceName" mat-cell style="cursor: pointer" *matCellDef="let element" (click)="meetingInfo(element)">
{{element.resource_name}}
</td>
</ng-container>
<ng-container matColumnDef="meeting_id">
<th mat-header-cell *matHeaderCellDef>Meeting Id</th>
<td mat-cell *matCellDef="let element"><a>{{element.meeting_id}}</a></td>
</ng-container>
<ng-container matColumnDef="resource_Email">
<th mat-header-cell *matHeaderCellDef>Resource Email</th>
<td mat-cell *matCellDef="let element"> {{element.resource_Email}}</td>
</ng-container>
<ng-container matColumnDef="contact">
<th mat-header-cell *matHeaderCellDef>Contact</th>
<td mat-cell *matCellDef="let element"> {{element.contact}}</td>
</ng-container>
<ng-container matColumnDef="meeting_fd_link">
<th mat-header-cell *matHeaderCellDef>Meeting feedback link</th>
<td mat-cell *matCellDef="let element"><a [routerLink]="['/b/signup-business']">
{{element.meeting_fd_link}}</a></td>
</ng-container>
<ng-container matColumnDef="meeting_time">
<th mat-header-cell *matHeaderCellDef>Meeting Time</th>
<td mat-cell *matCellDef="let element"> {{element.meeting_time}}</td>
</ng-container>
<ng-container matColumnDef="rating">
<th mat-header-cell *matHeaderCellDef>Rating</th>
<ul>
<td mat-cell *matCellDef="let element">
<li *ngFor="let i of element.rate">
<span class="fa fa-star checked"></span>
</li>
</td>
</ul>
</ng-container>
<tr mat-header-row *matHeaderRowDef="this.displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: this.displayedColumns;"></tr>
</table>
</mat-tab>
</mat-tab-group>
盒子代码
<div class="row" id="info" *ngIf="this.details">
<div class="col-md-12 mb-3" id="heading">
<h3>Meeting Information</h3>
</div>
<div class="col-6 col-md-3">
<p class="msg">Resource Name</p>
<p class="msg"> Resource Email</p>
<p class="msg"> Contact</p>
</div>
<div class="col-6 col-md-3">
<p>: {{meetingDetails.resource_name}}</p>
<p>: {{meetingDetails.resource_Email}}</p>
<p>: {{meetingDetails.contact}} </p>
</div>
<div class="col-6 col-md-3">
<p class="msg">Meeting Title</p>
<p class="msg">Meeting Feedback Link</p>
<p class="msg">Meeting Time</p>
<button class="cncl" name="Submit" type="Submit" (click)="cancelMeeting(meetingDetails.meeting_id)">Cancel Meeting</button>
</div>
<div class="col-6 col-md-3">
<p>: unavailable</p>
<p>: unavailable</p>
<p>: {{meetingDetails.meeting_time}} </p>
<button class="resd" name="Submit" type="Submit">Reschedule Meeting</button>
</div>
</div>