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

Commit 6247a47

Browse files
authored
Merge pull request #5851 from IgniteUI/dpetev/grid-search-samples
refactor(grids): cleanup search snippets
2 parents 0570daa + e3bf6f1 commit 6247a47

3 files changed

Lines changed: 27 additions & 27 deletions

File tree

en/components/grids_templates/search.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@ The methods from above return a **number** value (the number of times the @@igCo
165165

166166
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.
167167

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

171171
```html
172172
<!--searchgrid.component.html-->
173173

174-
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
175-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
176-
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
174+
<div class="resultsText">
175+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
176+
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
177177
</span>
178-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
178+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
179179
No results
180180
</span>
181181
</div>
@@ -322,11 +322,11 @@ On the right in our input group, let's create three separate containers with the
322322
<!--searchgrid.component.html-->
323323

324324
<igx-suffix *ngIf="searchText.length > 0">
325-
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
326-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
327-
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
325+
<div class="resultsText">
326+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
327+
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
328328
</span>
329-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
329+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
330330
No results
331331
</span>
332332
</div>

jp/components/grids_templates/search.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,17 @@ public exactMatch: boolean = false;
161161

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

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

167167
```html
168168
<!--searchgrid.component.html-->
169169

170-
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
171-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
172-
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
170+
<div class="resultsText">
171+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
172+
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
173173
</span>
174-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
174+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
175175
No results
176176
</span>
177177
</div>
@@ -317,11 +317,11 @@ public clearSearch() {
317317
<!--searchgrid.component.html-->
318318

319319
<igx-suffix *ngIf="searchText.length > 0">
320-
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
321-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
322-
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
320+
<div class="resultsText">
321+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
322+
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
323323
</span>
324-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
324+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
325325
No results
326326
</span>
327327
</div>

kr/components/grids_templates/search.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,17 @@ public exactMatch: boolean = false;
145145
#### 결과 수 표시
146146
총 결과 수와 함께 현재 검색 위치를 표시합니다! 그리드의 `lastSearchInfo` 속성을 사용하여 이것을 실행할 수 있습니다. 이 속성은 **find** 메소드를 사용할 때 자동으로 업데이트됩니다.
147147

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

151151
```html
152152
<!--searchgrid.component.html-->
153153

154-
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
155-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
156-
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
154+
<div class="resultsText">
155+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
156+
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
157157
</span>
158-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
158+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
159159
No results
160160
</span>
161161
</div>
@@ -294,11 +294,11 @@ public clearSearch() {
294294
<!--searchgrid.component.html-->
295295

296296
<igx-suffix *ngIf="searchText.length > 0">
297-
<div class="resultsText" *ngIf="@@igObjectRef.lastSearchInfo">
298-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length > 0">
299-
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchInfoCache.length }} results
297+
<div class="resultsText">
298+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount > 0">
299+
{{ @@igObjectRef.lastSearchInfo.activeMatchIndex + 1 }} of {{ @@igObjectRef.lastSearchInfo.matchCount }} results
300300
</span>
301-
<span *ngIf="@@igObjectRef.lastSearchInfo.matchInfoCache.length == 0">
301+
<span *ngIf="@@igObjectRef.lastSearchInfo.matchCount == 0">
302302
No results
303303
</span>
304304
</div>

0 commit comments

Comments
 (0)