Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 48537d9

Browse files
committed
chore: rollback changes to hopefully pass Cypress tests
1 parent 862c757 commit 48537d9

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

src/app/examples/grid-composite-editor.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2>
1515
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
1616
type="button"
1717
data-test="toggle-subtitle"
18-
(click)="hideSubTitle = !hideSubTitle"
18+
(click)="toggleSubTitle()"
1919
>
2020
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
2121
</button>
@@ -24,7 +24,7 @@ <h2>
2424
<span>Toggle Dark Mode</span>
2525
</button>
2626
</h2>
27-
<div class="subtitle" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
27+
<div class="subtitle" [innerHTML]="subTitle"></div>
2828

2929
<div class="mb-2">
3030
<div class="btn-group btn-group-sm" role="group" aria-label="Basic Editing Commands">

src/app/examples/grid-composite-editor.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,4 +1072,11 @@ export class GridCompositeEditorComponent implements OnDestroy, OnInit {
10721072
<span class="autocomplete-bottom-right">Type: <b>${item.itemTypeName === 'I' ? 'Item' : item.itemTypeName === 'C' ? 'PdCat' : 'Cat'}</b></span>
10731073
</div>`;
10741074
}
1075+
1076+
toggleSubTitle() {
1077+
this.hideSubTitle = !this.hideSubTitle;
1078+
const action = this.hideSubTitle ? 'add' : 'remove';
1079+
document.querySelector('.subtitle')?.classList[action]('hidden');
1080+
this.angularGrid.resizerService.resizeGrid(2);
1081+
}
10751082
}

src/app/examples/grid-graphql-nopage.component.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ <h2>
1414
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
1515
type="button"
1616
data-test="toggle-subtitle"
17-
(click)="hideSubTitle = !hideSubTitle"
17+
(click)="toggleSubTitle()"
1818
>
1919
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
2020
</button>
2121
</h2>
2222
<div class="subtitle row">
23-
<div class="col-12" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
23+
<div class="col-12" [innerHTML]="subTitle"></div>
2424
</div>
2525

2626
<div class="row">
@@ -34,6 +34,12 @@ <h2>
3434
</div>
3535
</div>
3636

37-
<angular-slickgrid gridId="grid27" [columnDefinitions]="columnDefinitions" [gridOptions]="gridOptions" [dataset]="dataset">
37+
<angular-slickgrid
38+
gridId="grid27"
39+
[columnDefinitions]="columnDefinitions"
40+
[gridOptions]="gridOptions"
41+
[dataset]="dataset"
42+
(onAngularGridCreated)="angularGridReady($event.detail)"
43+
>
3844
</angular-slickgrid>
3945
</div>

src/app/examples/grid-graphql-nopage.component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export class GridGraphqlWithoutPaginationComponent implements OnInit {
6464

6565
constructor(private http: HttpClient) {}
6666

67+
angularGridReady(angularGrid: AngularGridInstance) {
68+
this.angularGrid = angularGrid;
69+
}
70+
6771
ngOnInit(): void {
6872
this.columnDefinitions = [
6973
{ id: 'countryCode', field: 'code', name: 'Code', maxWidth: 90, sortable: true, filterable: true, columnGroup: 'Country' },
@@ -288,4 +292,11 @@ export class GridGraphqlWithoutPaginationComponent implements OnInit {
288292
const languageQuery = `query { languages { code, name, native }}`;
289293
return this.http.post<GraphqlResult<{ code: string; name: string; native: string }>>(COUNTRIES_API, { query: languageQuery });
290294
}
295+
296+
toggleSubTitle() {
297+
this.hideSubTitle = !this.hideSubTitle;
298+
const action = this.hideSubTitle ? 'add' : 'remove';
299+
document.querySelector('.subtitle')?.classList[action]('hidden');
300+
this.angularGrid.resizerService.resizeGrid(2);
301+
}
291302
}

0 commit comments

Comments
 (0)