Skip to content

Commit e8cf1d9

Browse files
tosspazhukaudev
authored andcommitted
fix(table): deprecated the search key (#366)
1 parent 69e883c commit e8cf1d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ng2-smart-table/lib/data-source/server/server.data-source.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ export class ServerDataSource extends LocalDataSource {
7676

7777
protected createRequestOptions(): RequestOptionsArgs {
7878
let requestOptions: RequestOptionsArgs = {};
79-
requestOptions.search = new URLSearchParams();
79+
requestOptions.params = new URLSearchParams();
8080

8181
requestOptions = this.addSortRequestOptions(requestOptions);
8282
requestOptions = this.addFilterRequestOptions(requestOptions);
8383
return this.addPagerRequestOptions(requestOptions);
8484
}
8585

8686
protected addSortRequestOptions(requestOptions: RequestOptionsArgs): RequestOptionsArgs {
87-
const searchParams: URLSearchParams = <URLSearchParams>requestOptions.search;
87+
const searchParams: URLSearchParams = <URLSearchParams>requestOptions.params;
8888

8989
if (this.sortConf) {
9090
this.sortConf.forEach((fieldConf) => {
@@ -97,7 +97,7 @@ export class ServerDataSource extends LocalDataSource {
9797
}
9898

9999
protected addFilterRequestOptions(requestOptions: RequestOptionsArgs): RequestOptionsArgs {
100-
const searchParams: URLSearchParams = <URLSearchParams>requestOptions.search;
100+
const searchParams: URLSearchParams = <URLSearchParams>requestOptions.params;
101101

102102
if (this.filterConf.filters) {
103103
this.filterConf.filters.forEach((fieldConf: any) => {
@@ -111,7 +111,7 @@ export class ServerDataSource extends LocalDataSource {
111111
}
112112

113113
protected addPagerRequestOptions(requestOptions: RequestOptionsArgs): RequestOptionsArgs {
114-
const searchParams: URLSearchParams = <URLSearchParams>requestOptions.search;
114+
const searchParams: URLSearchParams = <URLSearchParams>requestOptions.params;
115115

116116
if (this.pagingConf && this.pagingConf['page'] && this.pagingConf['perPage']) {
117117
searchParams.set(this.conf.pagerPageKey, this.pagingConf['page']);

0 commit comments

Comments
 (0)