Skip to content

Commit

Permalink
Merge branch 'tzhelev/samples-routing' of https://github.com/IgniteUI…
Browse files Browse the repository at this point in the history
…/igniteui-angular-samples into tzhelev/samples-routing
  • Loading branch information
Tacho committed Jul 25, 2018
2 parents f68a0f1 + 72dc4e3 commit abd97b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/combo/combo-features/combo-features.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ComboFeatures {
this.prevRequest.unsubscribe();
}

this.prevRequest = this.remoteService.getData(this.combo2.virtualizationState, null, () => {
this.prevRequest = this.remoteService.getData(this.combo2.virtualizationState, this.combo2.searchValue, () => {
this.cdr.detectChanges();
this.combo2.triggerCheck();
});
Expand Down
7 changes: 6 additions & 1 deletion src/app/grid/grid-crm/grid-crm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
scrollStrategy: new CloseScrollStrategy()
};

private frmt: Intl.DateTimeFormat;

constructor(private excelExporterService: IgxExcelExporterService) { }

public ngOnInit() {
Expand Down Expand Up @@ -173,7 +175,10 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
}

public formatDate(val: Date) {
return new Intl.DateTimeFormat("en-US").format(val);
if (!this.frmt) {
this.frmt = new Intl.DateTimeFormat("en-US");
}
return this.frmt.format(val);
}

public searchKeyDown(ev) {
Expand Down
8 changes: 4 additions & 4 deletions src/app/grid/services/remote.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export class RemoteService {
qS += `$skip=${skip}&$top=10&$count=true&$inlinecount=allpages`;

if (searchText) {
qS += `&$filter=substringof('` + searchText + `',ProductName)` +
`&$filter=substringof('` + searchText.toLowerCase() + `',ProductName)` +
`&$filter=substringof('` + searchText.toUpperCase() + `',ProductName)` +
`&$filter=substringof('` + this.toTitleCase(searchText) + `',ProductName)`;
qS += `&$filter=substringof('` + searchText + `',ProductName)` + ` or ` +
`substringof('` + searchText.toLowerCase() + `',ProductName)` + ` or ` +
`substringof('` + searchText.toUpperCase() + `',ProductName)` + ` or ` +
`substringof('` + this.toTitleCase(searchText) + `',ProductName)`;
}
}
return `${this.url}${qS}`;
Expand Down

0 comments on commit abd97b5

Please sign in to comment.