Skip to content

Commit abd97b5

Browse files
author
Tacho
committed
Merge branch 'tzhelev/samples-routing' of https://github.com/IgniteUI/igniteui-angular-samples into tzhelev/samples-routing
2 parents f68a0f1 + 72dc4e3 commit abd97b5

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/app/combo/combo-features/combo-features.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class ComboFeatures {
5050
this.prevRequest.unsubscribe();
5151
}
5252

53-
this.prevRequest = this.remoteService.getData(this.combo2.virtualizationState, null, () => {
53+
this.prevRequest = this.remoteService.getData(this.combo2.virtualizationState, this.combo2.searchValue, () => {
5454
this.cdr.detectChanges();
5555
this.combo2.triggerCheck();
5656
});

src/app/grid/grid-crm/grid-crm.component.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
121121
scrollStrategy: new CloseScrollStrategy()
122122
};
123123

124+
private frmt: Intl.DateTimeFormat;
125+
124126
constructor(private excelExporterService: IgxExcelExporterService) { }
125127

126128
public ngOnInit() {
@@ -173,7 +175,10 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
173175
}
174176

175177
public formatDate(val: Date) {
176-
return new Intl.DateTimeFormat("en-US").format(val);
178+
if (!this.frmt) {
179+
this.frmt = new Intl.DateTimeFormat("en-US");
180+
}
181+
return this.frmt.format(val);
177182
}
178183

179184
public searchKeyDown(ev) {

src/app/grid/services/remote.service.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ export class RemoteService {
3939
qS += `$skip=${skip}&$top=10&$count=true&$inlinecount=allpages`;
4040

4141
if (searchText) {
42-
qS += `&$filter=substringof('` + searchText + `',ProductName)` +
43-
`&$filter=substringof('` + searchText.toLowerCase() + `',ProductName)` +
44-
`&$filter=substringof('` + searchText.toUpperCase() + `',ProductName)` +
45-
`&$filter=substringof('` + this.toTitleCase(searchText) + `',ProductName)`;
42+
qS += `&$filter=substringof('` + searchText + `',ProductName)` + ` or ` +
43+
`substringof('` + searchText.toLowerCase() + `',ProductName)` + ` or ` +
44+
`substringof('` + searchText.toUpperCase() + `',ProductName)` + ` or ` +
45+
`substringof('` + this.toTitleCase(searchText) + `',ProductName)`;
4646
}
4747
}
4848
return `${this.url}${qS}`;

0 commit comments

Comments
 (0)