Skip to Content
Jan 10, 2020 at 01:52 AM

Custom library: Filter is applied only to visible records


Hi experts,

My motivation is to create a custom library which has reusable search helps.

This time, I have created a custom library which contains table select dialog for country codes.

The problem is, when I try to apply filter on the table, the filter is applyed only to those records which are visible in the table.

For example, when I first search with 'JP', it is not shown because JP is not yet visible in the list.

Next, I scroll down and make JP visible. Now, I can filter by JP.





The code to apply filter is below

		onSearch : function (oEvent) {
			var aFilter = [],
				sQuery, oBinding;
			sQuery = $.trim(oEvent.getParameter("value"));
			if (sQuery) {
				aFilter.push(new Filter("Landx", FilterOperator.Contains, sQuery));				
			oBinding = oEvent.getSource().getBinding("items");

I found in the debugger that $batch response contains expected record, but it is not reflected to the table.

I also confirmed that the same code is working fine when I implement a table select dialog within a application (not using library) so I can say this is not caused by the back-end OData service.


I have implemented the custome library referring to below information.


initial-state.png (23.0 kB)
search-by-jp.png (6.6 kB)
display-jp.png (22.1 kB)