BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
When I call Grid.filterByColumn('column1, 'equal', value) more than once, I would expect it to replace the previous filter value for column1. Instead it adds each filter value to the last resulting in an OR query being sent to the server.
I've tried calling Grid.clearFiltering('column1') but that appears to clear all the filters AND does a post to the server which I don't want, as then when I call filterByColumn() I'm hitting the serve twice for one filter change.
I can't think of a reason why this makes any sense. Is there a way to get subsequent calls to filterByColumn() for the same column to overwrite the previous filter value rather than add it to an OR query?
It only seems to happen when setting the filter to a string value and then to null and back again.
So if you call e.g.
filterByColumn('column1', 'equal', 'ID123')
And then:
filterByColumn('column1', 'equal', 'ID456')
It works fine, doesn't create an OR query.
But then if you call:
filterByColumn('column1', 'equal', null)
You end up with an OR query like this:
"OR": [
{
"column1": {
"equals": "ID456"
}
},
{
"column1": {
"equals": null
}
}
]
Hi Rob,
Query : Grid.filterByColumn() generates an OR query
After reviewing your query, we noticed that when filtering with filterByColumn('column1', 'equal', null) null value both null and undefined is filtered.
Then filtering with string column filterByColumn('column1', 'equal', string) empty string , null and undefined these three will be filtered. This is the default behaviour of filterByColumn() method.
filterByColumn('column1', 'equal', null)
2. Undefined value
Kindly get back to us if you have any concern.
Regards,
Harini
This doesn't make a lot of sense.
If I call filterByColumn() several times, each time it should replace the filter (not add to it as it sometimes does).
Instead it sometimes generates an OR query.
How would it ever make sense to filter by e.g.
'123' OR null OR undefined
Hi Rob,
Query : Grid.filterByColumn() generates an OR query
As per your query we want to tell you that the null values are not added to the previous filter. If you are still facing the issue please share your following details.
Please get back to us if you have any concern.
Regards,
Harini