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

Commit 2d08078

Browse files
committed
chore: add subtitle toggle to all examples
1 parent 698b736 commit 2d08078

File tree

93 files changed

+450
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+450
-108
lines changed

docs/grid-functionalities/row-detail.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ export class MainGridComponent implements OnInit {
408408
gridOptions!: GridOption;
409409
angularGrid!: AngularGridInstance;
410410
dataset: Distributor[] = [];
411-
showSubTitle = true;
412411

413412
get rowDetailInstance(): SlickRowDetailView {
414413
return this.angularGrid.extensions.rowDetailView?.instance || {};

src/app/examples/grid-additem.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ <h2>
1010
<span class="mdi mdi-link-variant"></span> code
1111
</a>
1212
</span>
13+
<button
14+
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
15+
type="button"
16+
data-test="toggle-subtitle"
17+
(click)="hideSubTitle = !hideSubTitle"
18+
>
19+
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
20+
</button>
1321
</h2>
14-
<div class="subtitle" [innerHTML]="subTitle"></div>
22+
<div class="subtitle" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
1523

1624
<div class="col-sm-12">
1725
<span>

src/app/examples/grid-additem.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class GridAddItemComponent implements OnInit {
4444
dataView!: SlickDataView;
4545
columnDefinitions: Column[] = [];
4646
gridOptions!: GridOption;
47+
hideSubTitle = false;
4748
dataset: any[];
4849
updatedObject: any;
4950

src/app/examples/grid-angular.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ <h2>
1010
<span class="mdi mdi-link-variant"></span> code
1111
</a>
1212
</span>
13+
<button
14+
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
15+
type="button"
16+
data-test="toggle-subtitle"
17+
(click)="hideSubTitle = !hideSubTitle"
18+
>
19+
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
20+
</button>
1321
</h2>
14-
<div class="subtitle" [innerHTML]="subTitle"></div>
22+
<div class="subtitle" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
1523

1624
<div class="col-sm-6">
1725
<label>autoEdit setting: </label>

src/app/examples/grid-angular.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class GridAngularComponent implements OnInit {
5959
dataset!: any[];
6060
gridObj: any;
6161
isAutoEdit = true;
62+
hideSubTitle = false;
6263
alertWarning: any;
6364
updatedObject: any;
6465
selectedLanguage = 'en';

src/app/examples/grid-autoheight.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ <h2>
1010
<span class="mdi mdi-link-variant"></span> code
1111
</a>
1212
</span>
13+
<button
14+
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
15+
type="button"
16+
data-test="toggle-subtitle"
17+
(click)="hideSubTitle = !hideSubTitle"
18+
>
19+
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
20+
</button>
1321
</h2>
14-
<div class="subtitle" [innerHTML]="subTitle"></div>
22+
<div class="subtitle" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
1523

1624
<div class="row row-cols-lg-auto g-1 align-items-center">
1725
<div class="col">

src/app/examples/grid-autoheight.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class GridAutoHeightComponent implements OnInit {
3636
selectedOperator = '=';
3737
searchValue = '';
3838
selectedColumn?: Column;
39+
hideSubTitle = false;
3940

4041
ngOnInit() {
4142
this.prepareGrid();

src/app/examples/grid-base-row-editing.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,17 @@ <h2>
99
<span class="mdi mdi-link-variant"></span> code
1010
</a>
1111
</span>
12+
<button
13+
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
14+
type="button"
15+
data-test="toggle-subtitle"
16+
(click)="hideSubTitle = !hideSubTitle"
17+
>
18+
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
19+
</button>
1220
</h2>
1321

14-
<div class="subtitle">
22+
<div class="subtitle" [hidden]="hideSubTitle">
1523
<ul>
1624
<li>
1725
The Row Based Edit plugin allows you to edit either a single or multiple specific rows at a time, while disabling the rest

src/app/examples/grid-base-row-editing.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class GridBaseRowEditingComponent implements OnInit {
2323
fetchResult = '';
2424
statusClass = 'alert alert-light';
2525
statusStyle = 'display: none';
26+
hideSubTitle = false;
2627

2728
constructor(private translate: TranslateService) {
2829
// always start with English for Cypress E2E tests to be consistent

src/app/examples/grid-basic.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ <h2>
1010
<span class="mdi mdi-link-variant"></span> code
1111
</a>
1212
</span>
13+
<button
14+
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
15+
type="button"
16+
data-test="toggle-subtitle"
17+
(click)="hideSubTitle = !hideSubTitle"
18+
>
19+
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
20+
</button>
1321
</h2>
14-
<div class="subtitle" [innerHTML]="subTitle"></div>
22+
<div class="subtitle" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
1523

1624
<h3>
1725
<div class="column">

0 commit comments

Comments
 (0)