However we noticed that whenever we tried to use it, we weren't able to get access to the this.value property mentioned in the docs (which represents the value the user typed in).
We tried this with a very simple example of a combo column
. We do hit the debugger here whenever a user types into the combo box - but the value remains undefined. We attempted to replicate this issue on a bryntum demo - but the exact same code in the Bryntum basic demo (https://bryntum.com/examples/grid/basic/) seemed to work - which makes us suspect it might be a platform issue.
Do you have any idea what could be going wrong here? Can you confirm whether this could just be a issue on the Lightning platform? Are we simply using the primaryFilter wrong?
I have reproduced the problem, and it occurs because Lightning Locker is corrupting the [[BoundThis]] for filterBy. We have one LWC which defines a config object, which is passed to another LWC to delegate construction of the grid. The corruption occurs as function properties are mutated when passed between LWC component boundaries.
The result is that when the configuration object for primaryFilter is used to construct the grid, the filterBy function is no longer bound to the right this. I think this problem could be addressed by Bryntum by using Function.apply() to force the right instance.
I was however able to work around this problem by finding the primary filter from the records first store like so...
filterBy(record) {
const store = record.firstStore,
primaryFilter = store.filters.find(({ id }) => id === 'primary'),
{ value } = primaryFilter;
We are using Salesforce apiVersion 55, and do not have LWS enabled. Note that the problem only happens because of how the components are marshalled between two LWCs, as explained in my post of April 27. The issue will not be reproducible using a single LWC configuration.
I have reproduced the problem, and it occurs because Lightning Locker is corrupting the [[BoundThis]] for filterBy. We have one LWC which defines a config object, which is passed to another LWC to delegate construction of the grid. The corruption occurs as function properties are mutated when passed between LWC component boundaries.
Could you please share some code with us? Not clear what should we implement to reproduce the problem.