Skip to content

Commit

Permalink
Use responsive-table class to add scrollbar when table overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
RohithSurya committed Sep 4, 2023
1 parent c6e3b18 commit 5da33b8
Showing 1 changed file with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,30 @@
</li>
</ul>
</div>
<table class="table margin-top-15px background-color-white table-striped" *ngIf="model.isUsingOtherVisibilitySetting" aria-label="Custom Visibility Options Table">
<thead>
<tr>
<th scope="col" class="text-start">User/Group</th>
<th scope="col" class="text-center" *ngFor="let visibilityControl of VisibilityControl | enumToArray">{{ visibilityControl | visibilityControlName }}</th>
</tr>
</thead>
<tbody id="custom-visibility-table">
<ng-container *ngFor="let visibilityType of FeedbackVisibilityType | enumToArray">
<tr *ngIf="visibilityStateMachine.isVisibilityTypeApplicable(visibilityType)">
<td><span class="ngb-tooltip-class" [ngbTooltip]="visibilityType | visibilityTypeDescription" container="body">{{ visibilityType | visibilityTypeName }}</span></td>
<td *ngFor="let visibilityControl of VisibilityControl | enumToArray" class="text-center">
<input type="checkbox"
(click)="modifyVisibilityControl($event.target.checked, visibilityType, visibilityControl)"
[checked]="visibilityStateMachine.isVisible(visibilityType, visibilityControl)"
[disabled]="!visibilityStateMachine.isCellEditable(visibilityType, visibilityControl) || !model.isEditable"
[attr.aria-label]="getCheckboxAriaLabel(visibilityType, visibilityControl)">
</td>
<div class="table-responsive">
<table class="table margin-top-15px background-color-white table-striped" *ngIf="model.isUsingOtherVisibilitySetting" aria-label="Custom Visibility Options Table">
<thead>
<tr>
<th scope="col" class="text-start">User/Group</th>
<th scope="col" class="text-center" *ngFor="let visibilityControl of VisibilityControl | enumToArray">{{ visibilityControl | visibilityControlName }}</th>
</tr>
</ng-container>
</tbody>
</table>
</thead>
<tbody id="custom-visibility-table">
<ng-container *ngFor="let visibilityType of FeedbackVisibilityType | enumToArray">
<tr *ngIf="visibilityStateMachine.isVisibilityTypeApplicable(visibilityType)">
<td><span class="ngb-tooltip-class" [ngbTooltip]="visibilityType | visibilityTypeDescription" container="body">{{ visibilityType | visibilityTypeName }}</span></td>
<td *ngFor="let visibilityControl of VisibilityControl | enumToArray" class="text-center">
<input type="checkbox"
(click)="modifyVisibilityControl($event.target.checked, visibilityType, visibilityControl)"
[checked]="visibilityStateMachine.isVisible(visibilityType, visibilityControl)"
[disabled]="!visibilityStateMachine.isCellEditable(visibilityType, visibilityControl) || !model.isEditable"
[attr.aria-label]="getCheckboxAriaLabel(visibilityType, visibilityControl)">
</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
<div class="margin-top-15px visibility-message">
This is the visibility hint as seen by the feedback giver:
<ul class="text-muted background-color-warning">
Expand Down

0 comments on commit 5da33b8

Please sign in to comment.