Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions en/components/grids_templates/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@ The methods from above return a **number** value (the number of times the @@igCo

Let's also display the position of the current occurrence, along with the total results count! We can do this by using the grid's `lastSearchInfo` property. This property is automatically updated when using the **find** methods.

- The `@@igObjectRef.lastSearchInfo.matchInfoCache.length` value will give us the total results count.
- The `@@igObjectRef.lastSearchInfo.matchCount` value will give us the total results count.
- The `@@igObjectRef.lastSearchInfo.activeMatchIndex` value will give us the index position of the current occurrence (match).

```html
<!--searchgrid.component.html-->

<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
<div class="resultsText">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
</span>
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
Comment on lines +174 to +178
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template now accesses @@igObjectRef.lastSearchInfo.matchCount without guarding lastSearchInfo. If lastSearchInfo is undefined before the first findNext/findPrev call, Angular will throw when evaluating the *ngIf expressions. Consider restoring the *ngIf="@@igObjectRef.lastSearchInfo" guard or using the safe-navigation operator (e.g., lastSearchInfo?.matchCount).

Copilot uses AI. Check for mistakes.
No results
</span>
</div>
Expand Down Expand Up @@ -322,11 +322,11 @@ On the right in our input group, let's create three separate containers with the
<!--searchgrid.component.html-->

<igx-suffix *ngIf="searchText.length > 0">
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
<div class="resultsText">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
</span>
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
No results
Comment on lines 324 to 330
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside the igx-suffix block, @@igObjectRef.lastSearchInfo.matchCount is used without guarding lastSearchInfo. If searchText is pre-populated (or findNext hasn’t run yet) this can still evaluate with lastSearchInfo undefined and cause a template error. Guard lastSearchInfo or use safe navigation.

Copilot uses AI. Check for mistakes.
</span>
</div>
Expand Down
18 changes: 9 additions & 9 deletions jp/components/grids_templates/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,17 @@ public exactMatch: boolean = false;

検索で見つかった現在の場所と総個数を示します。グリッドの `lastSearchInfo` プロパティを使用します。このプロパティは、**find** メソッド使用時に自動的に更新されます。

- `@@igObjectRef.lastSearchInfo.matchInfoCache.length` 値は検索で見つかった個数です。
- `@@igObjectRef.lastSearchInfo.matchCount` 値は検索で見つかった個数です。
- `@@igObjectRef.lastSearchInfo.activeMatchIndex` 値は、現在の一致 (出現) のインデックス位置です。

```html
<!--searchgrid.component.html-->

<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
<div class="resultsText">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
</span>
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
Comment on lines +170 to +174
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@igObjectRef.lastSearchInfo.matchCount is referenced without checking lastSearchInfo first. If lastSearchInfo is undefined before the first search, Angular will throw when evaluating the *ngIf expressions. Consider adding back an *ngIf="@@igObjectRef.lastSearchInfo" guard or using safe navigation (lastSearchInfo?.matchCount).

Copilot uses AI. Check for mistakes.
No results
</span>
</div>
Expand Down Expand Up @@ -317,11 +317,11 @@ public clearSearch() {
<!--searchgrid.component.html-->

<igx-suffix *ngIf="searchText.length > 0">
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
<div class="resultsText">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
</span>
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
No results
Comment on lines 319 to 325
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this snippet, @@igObjectRef.lastSearchInfo.matchCount is accessed without guarding lastSearchInfo. Even though the suffix is shown when searchText.length > 0, lastSearchInfo can still be undefined (e.g., when searchText is set programmatically before running findNext). Guard lastSearchInfo or use safe navigation.

Copilot uses AI. Check for mistakes.
</span>
</div>
Expand Down
18 changes: 9 additions & 9 deletions kr/components/grids_templates/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,17 @@ public exactMatch: boolean = false;
#### 결과 수 표시
총 결과 수와 함께 현재 검색 위치를 표시합니다! 그리드의 `lastSearchInfo` 속성을 사용하여 이것을 실행할 수 있습니다. 이 속성은 **find** 메소드를 사용할 때 자동으로 업데이트됩니다.

- `@@igObjectRef.lastSearchInfo.matchInfoCache.length` 값은 총 결과 수입니다.
- `@@igObjectRef.lastSearchInfo.matchCount` 값은 총 결과 수입니다.
- `@@igObjectRef.lastSearchInfo.activeMatchIndex` 값은 현재 검색(일치)의 인덱스 위치입니다.

```html
<!--searchgrid.component.html-->

<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
<div class="resultsText">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
</span>
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
Comment on lines +154 to +158
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@igObjectRef.lastSearchInfo.matchCount is used without guarding lastSearchInfo. If lastSearchInfo is undefined before the first findNext/findPrev call, Angular can throw while evaluating these *ngIf expressions. Consider restoring the *ngIf="@@igObjectRef.lastSearchInfo" guard or using safe navigation (lastSearchInfo?.matchCount).

Copilot uses AI. Check for mistakes.
No results
</span>
</div>
Expand Down Expand Up @@ -294,11 +294,11 @@ public clearSearch() {
<!--searchgrid.component.html-->

<igx-suffix *ngIf="searchText.length > 0">
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
<div class="resultsText">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
</span>
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
No results
Comment on lines 296 to 302
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Within the igx-suffix block, @@igObjectRef.lastSearchInfo.matchCount is accessed without guarding lastSearchInfo. If searchText is initialized programmatically and findNext hasn’t executed yet, this can still error. Guard lastSearchInfo or use safe navigation.

Copilot uses AI. Check for mistakes.
</span>
</div>
Expand Down
Loading