Skip to content

Commit 133401e

Browse files
author
Konstantin Dinev
authored
Merge pull request #3435 from IgniteUI/grid-search-samples
feat(grid search): updating sample chips
2 parents ca1b388 + 42b1c2e commit 133401e

File tree

7 files changed

+100
-64
lines changed

7 files changed

+100
-64
lines changed

package-lock.json

Lines changed: 76 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/data-display/text-highlight/text-highlight-sample-1/text-highlight-sample-1.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<igx-suffix>
1111
<div class="caseSensitiveButton">
12-
<button igxIconButton="flat" igxRipple [igxRippleCentered]="true" (click)="updateSearch()"
13-
[style.background]="caseSensitive ? 'rgb(73, 180, 254)' : 'transparent'">
12+
<button type="button" igxIconButton="flat" igxRipple [igxRippleCentered]="true" (click)="updateSearch()"
13+
[style.background]="caseSensitive ? 'rgb(73, 180, 254)' : 'transparent'" title="Match case">
1414
<igx-icon class="caseSensitiveIcon" family="material">text_fields</igx-icon>
1515
</button>
1616
</div>

src/app/data-display/text-highlight/text-highlight-sample-1/text-highlight-sample-1.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-disable max-len */
2-
import { Component, ViewChild } from '@angular/core';
2+
import { Component, OnDestroy, ViewChild } from '@angular/core';
33
import { IgxTextHighlightDirective, IgxTextHighlightService } from 'igniteui-angular';
44

55
@Component({
66
selector: 'app-text-highlight-1',
77
styleUrls: ['./text-highlight-sample-1.component.scss'],
88
templateUrl: './text-highlight-sample-1.component.html'
99
})
10-
export class TextHighlightSample1Component {
10+
export class TextHighlightSample1Component implements OnDestroy {
1111
@ViewChild(IgxTextHighlightDirective, { read: IgxTextHighlightDirective, static: true })
1212
public highlight: IgxTextHighlightDirective;
1313
// tslint:disable max-line-length
@@ -28,6 +28,10 @@ export class TextHighlightSample1Component {
2828

2929
constructor(private highlightService: IgxTextHighlightService) { }
3030

31+
public ngOnDestroy() {
32+
this.highlightService.destroyGroup('group1');
33+
}
34+
3135
public searchKeyDown(ev) {
3236
if (this.searchText) {
3337
if (ev.key === 'Enter' || ev.key === 'ArrowDown' || ev.key === 'ArrowRight') {

src/app/data-display/text-highlight/text-highlight-sample-2/text-highlight-sample-2.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-disable max-len */
2-
import { Component, ViewChildren } from '@angular/core';
2+
import { Component, OnDestroy, ViewChildren } from '@angular/core';
33
import { IgxTextHighlightDirective, IgxTextHighlightService } from 'igniteui-angular';
44

55
@Component({
66
selector: 'app-text-highlight-2',
77
styleUrls: ['./text-highlight-sample-2.component.scss'],
88
templateUrl: './text-highlight-sample-2.component.html'
99
})
10-
export class TextHighlightSample2Component {
10+
export class TextHighlightSample2Component implements OnDestroy {
1111
@ViewChildren(IgxTextHighlightDirective)
1212
public highlights;
1313
// tslint:disable max-line-length
@@ -34,6 +34,10 @@ export class TextHighlightSample2Component {
3434

3535
constructor(private highlightService: IgxTextHighlightService) { }
3636

37+
public ngOnDestroy() {
38+
this.highlightService.destroyGroup('group1');
39+
}
40+
3741
public searchKeyDown(ev) {
3842
if (this.searchText) {
3943
if (ev.key === 'Enter' || ev.key === 'ArrowDown' || ev.key === 'ArrowRight') {

src/app/data-display/text-highlight/text-highlight-style/text-highlight-style.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-disable max-len */
2-
import { Component, ViewChild } from '@angular/core';
2+
import { Component, OnDestroy, ViewChild } from '@angular/core';
33
import { IgxTextHighlightDirective, IgxTextHighlightService } from 'igniteui-angular';
44

55
@Component({
66
selector: 'app-text-highlight-style',
77
styleUrls: ['./text-highlight-style.component.scss'],
88
templateUrl: './text-highlight-style.component.html'
99
})
10-
export class TextHighlightStyleComponent {
10+
export class TextHighlightStyleComponent implements OnDestroy {
1111
@ViewChild(IgxTextHighlightDirective, { read: IgxTextHighlightDirective, static: true })
1212
public highlight: IgxTextHighlightDirective;
1313

@@ -27,6 +27,10 @@ export class TextHighlightStyleComponent {
2727

2828
constructor(private highlightService: IgxTextHighlightService) { }
2929

30+
public ngOnDestroy() {
31+
this.highlightService.destroyGroup('group1');
32+
}
33+
3034
public searchKeyDown(ev) {
3135
if (this.searchText) {
3236
if (ev.key === 'Enter' || ev.key === 'ArrowDown' || ev.key === 'ArrowRight') {

src/app/grid/grid-search-sample/grid-search-sample.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<div class="chips">
2222
<igx-chips-area>
2323
<igx-chip (click)="updateSearch()" [color]="caseSensitive? 'lightgrey' : 'rgba(0, 0, 0, .04)'">
24-
<span>Case Sensitive</span>
24+
<span title="Match case">Aa</span>
2525
</igx-chip>
2626
<igx-chip (click)="updateExactSearch()" [color]="exactMatch? 'lightgrey' : 'rgba(0, 0, 0, .04)'">
27-
<span>Exact Match</span>
27+
<u title="Exact match">Ab</u>
2828
</igx-chip>
2929
</igx-chips-area>
3030
</div>

src/app/tree-grid/tree-grid-search-sample/tree-grid-search-sample.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<div class="chips">
2222
<igx-chips-area>
2323
<igx-chip (click)="updateSearch()" [color]="caseSensitive? 'lightgrey' : 'rgba(0, 0, 0, .04)'">
24-
<span>Case Sensitive</span>
24+
<span title="Match case">Aa</span>
2525
</igx-chip>
2626
<igx-chip (click)="updateExactSearch()" [color]="exactMatch? 'lightgrey' : 'rgba(0, 0, 0, .04)'">
27-
<span>Exact Match</span>
27+
<u title="Exact match">Ab</u>
2828
</igx-chip>
2929
</igx-chips-area>
3030
</div>

0 commit comments

Comments
 (0)