Skip to content

Commit 3b1515d

Browse files
fix my views search box
1 parent 82ae0b7 commit 3b1515d

File tree

1 file changed

+31
-38
lines changed

1 file changed

+31
-38
lines changed

src/app/components/home-app/view-list/view-list.component.html

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,31 @@
1010
</div>
1111
<span class="views-title text">My Views</span>
1212
@if (canCreate$ | async) {
13-
<button
14-
mat-icon-button
15-
matTooltip="Add New View"
16-
(click)="create()"
17-
>
13+
<button mat-icon-button matTooltip="Add New View" (click)="create()">
1814
<mat-icon class="mdi-24px" fontIcon="mdi-plus-circle"> </mat-icon>
1915
</button>
2016
}
21-
<div class="searchBox d-flex align-items-center">
22-
<mat-icon
23-
class="text"
24-
style="transform: scale(0.85); margin-right: 5px"
25-
svgIcon="ic_magnify_search"
26-
></mat-icon>
27-
<mat-form-field style="width: 320px">
17+
<div class="searchBox my-1">
18+
<mat-form-field style="width: 320px" subscriptSizing="dynamic">
19+
<mat-icon
20+
matPrefix
21+
class="text"
22+
style="transform: scale(0.85); margin-right: 5px"
23+
svgIcon="ic_magnify_search"
24+
></mat-icon>
2825
<input
2926
matInput
3027
[(ngModel)]="filterString"
3128
(keyup)="applyFilter($event.target.value)"
3229
placeholder="Search"
33-
/>
30+
/>
3431
@if (filterString !== '') {
3532
<button
3633
mat-icon-button
3734
matSuffix
3835
(click)="clearFilter()"
3936
title="Clear Search"
40-
>
37+
>
4138
<mat-icon
4239
style="transform: scale(0.85)"
4340
svgIcon="ic_cancel_circle"
@@ -49,9 +46,7 @@
4946
</div>
5047

5148
@if (isLoading) {
52-
<mat-card
53-
class="d-flex justify-content-center align-items-center"
54-
>
49+
<mat-card class="d-flex justify-content-center align-items-center">
5550
<mat-progress-spinner color="primary" mode="indeterminate">
5651
</mat-progress-spinner>
5752
</mat-card>
@@ -63,7 +58,7 @@
6358
matSort
6459
matSortActive="name"
6560
matSortDirection="asc"
66-
>
61+
>
6762
<!--- Note that these columns can be defined in any order.
6863
The actual rendered columns are set as a property on the row definition" -->
6964
<!-- Name Column -->
@@ -77,25 +72,23 @@
7772
[routerLink]="['/view', element.id]"
7873
[queryParams]="{ teamId: asdf }"
7974
>{{ element.name }}</a
80-
>
81-
</div>
82-
</mat-cell>
83-
</ng-container>
75+
>
76+
</div>
77+
</mat-cell>
78+
</ng-container>
8479

85-
<!-- Name Column -->
86-
<ng-container matColumnDef="description">
87-
<mat-header-cell *matHeaderCellDef> Description </mat-header-cell>
88-
<mat-cell *matCellDef="let element">
89-
<div class="description-text">{{ element.description }}</div>
90-
</mat-cell>
91-
</ng-container>
80+
<!-- Name Column -->
81+
<ng-container matColumnDef="description">
82+
<mat-header-cell *matHeaderCellDef> Description </mat-header-cell>
83+
<mat-cell *matCellDef="let element">
84+
<div class="description-text">{{ element.description }}</div>
85+
</mat-cell>
86+
</ng-container>
9287

93-
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
94-
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
95-
</mat-table>
96-
@if (dataSource.filteredData.length === 0) {
97-
<div class="text no-results">
98-
No results found
99-
</div>
100-
}
101-
</div>
88+
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
89+
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
90+
</mat-table>
91+
@if (dataSource.filteredData.length === 0) {
92+
<div class="text no-results">No results found</div>
93+
}
94+
</div>

0 commit comments

Comments
 (0)