I retrieve the data for a page with kind of a cascade filtering: the result from one data set is used as a filter value for a next one. I do this not to use too many parameters while navigate between pages.
The problem is that when I search for a value in a field, the request send to the server does not include original filters, only the filter by the value.
The code:
load() {
this.lhpg.getFamRevClientIds(`fam_rev_id eq ${this.parameters.FamRevId}`, null, null, null, null, null, null, null)
.subscribe((result: any) => {
this.CurrentPath = result.value[0];
this.lhpg.getSpfFulls(`client_id eq ${this.CurrentPath.client_id}`, null, null, null, null, null, null, null)
.subscribe((result: any) => {
this.getSpfFullsResult = result.value;..................etc
grid0LoadData(event: any) {
this.lhpg.getSpfFulls(`${event.filter}`, event.top, event.skip, `${event.orderby}`, event.top != null && event.skip != null, ``, null, null)
.subscribe((result: any) => {
this.getSpfFullsResult = result.value;
this.getSpfFullsCount = event.top != null && event.skip != null ? result['@odata.count'] : result.value.length;
}, (result: any) => {
});
}
Should I completely avoid explicit LoadData event declaration? Why doesn't it inherit the filter for the event?