Remote filtering on nested objects

Our blazing fast Grid component built with pure JavaScript


Post Reply
User avatar
Robert Hirst
Premium Member
Premium Member
Posts: 21
Joined: Tue Sep 11, 2018 4:32 pm

Remote filtering on nested objects

Post by Robert Hirst »

I'm trying to implement a remote filtering grid and my data has some nested objects.

E.g.

Code: Select all

{
	"id": 1,
	"deepObject": {
		"someProperty":"example"
	}
}
I'm able to specify columns with a field of "deepObject.someProperty" which displays as expected.

I can also use the top bar filtering to filter the result set, and it all gets passed through correctly.

However, if I use the cell "Equals" function, then the filter bar at the top shows [objectObject] (implying it's passing the entire deepObject object, rather than the "someProperty" property. When the remote filter is call, the value is not set under those conditions.

Is there a way to make the cell context "Equals" menu item pass through the actual field displayed?

I've attached a modified version of the remote paging and filtering example which copies the name into a nested object, and displays the columns from that nested object.

The console outputs the search params passed (as I haven't updated the faked Ajax store to filter on dot notation).

1. Press the filter in the column header and enter a value
2. Observe params object passed in the console, and note that value is passed.
3. Clear the filter, and then right click a cell and select "Equals"
4. Observe params object passed in the console, and note that a value is not passed. Additionally, clicking the Filter button in the header displays "[object Object]".

Is there any way to change what is passed from the cell context menu "Equals" function to be the field value specified, rather than (what I assume is) the entire nested object?
Attachments
paged.zip
(273.65 KiB) Downloaded 67 times

User avatar
saki
Core Developer
Core Developer
Posts: 890
Joined: Thu Mar 30, 2017 9:32 am

Re: Remote filtering on nested objects

Post by saki »

Yes, we could reproduce it and it seems to be a bug. Thank you for reporting.

https://github.com/bryntum/support/issues/382

Post Reply