File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
samples/grids/hierarchical-grid/remote-paging-sample/src Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 1- import { BehaviorSubject } from 'rxjs' ;
2- const URL = `https://data-northwind.indigo.design/` ;
3-
4- function buildUrl ( dataState : any , index ?: number , perPage ?: number ) : string {
5- let qS = "" ;
6- if ( dataState ) {
7- if ( dataState . rootLevel ) {
8- qS += `${ dataState . key } ` ;
9- } else {
10- qS += `${ dataState . parentKey } /${ dataState . parentID } /${ dataState . key } ` ;
11- }
12- }
13-
14- // Add index and perPage to the query string if they are defined
15- if ( index !== undefined ) {
16- qS += `?index=${ index } ` ;
17- if ( perPage !== undefined ) {
18- qS += `&perPage=${ perPage } ` ;
19- }
20- } else if ( perPage !== undefined ) {
21- qS += `?perPage=${ perPage } ` ;
22- }
23-
24- return `${ URL } ${ qS } ` ;
25- }
26-
271export class RemotePagingService {
282 public static BASE_URL = 'https://data-northwind.indigo.design/' ;
293 public static CUSTOMERS_URL = `${ RemotePagingService . BASE_URL } Customers/GetCustomersWithPage` ;
You can’t perform that action at this time.
0 commit comments