Hello,
I use GridColumnMenuCheckboxFilter to filter my grid.
But today I realize return data of GridColumnMenuCheckboxFilter is different than I used to before.
Before on dataStateChange function data property of event parameter was:
{
"filter"
:{
"filters"
:
[
{
"field"
:
"city"
,
"operator"
:
"eq"
,
"value"
:
"ANKARA"
}
],
"logic"
:
"or"
}
}
Now it is:
{
"filter"
:{
"filters"
:
[
{
"logic"
:
"or"
,
"filters"
:[{
"field"
:
"city"
,
"operator"
:
"eq"
,
"value"
:
"ANKARA"
}]
}
],
"logic"
:
"and"
}
}
Is return data of GridColumnMenuCheckboxFilter changed?
6 Answers, 1 is accepted
and I can't give a color to active filter because th.k-header does not update to active.
I am using the code below to colorize active filter as you told before:
th.k-header.active > div > div {
color
:
#f5222d
;
}
Hello, Furkan,
Yes, the return type was changed (fixed) based on this issue:
https://github.com/telerik/kendo-react/issues/508
The reason is that the GridColumnMenuCheckboxFilter should produce composite filters, where initially it was producing flat filters with 'or'.
With the older version for example, if we filter on values 1 and 2 from column price and then value discounted from column promotion, we will still have values 1 and 2 even if one of them is not discounted because the filter expression was, 1 or 2 or discounted. The correct one is filter 1 - value 1 or 2 and filter 2 discounted.
-----------------------------------------------------------------------------------------------------------------------
As for the active state, this requires setting the headerClassName programmatically if the filter is part of the filter collection. I made an example showcasing this:
https://stackblitz.com/edit/react-jbuuvw?file=app%2Fmain.jsx (applied to the ProductID column)
We will consider making a helper method for this as well to improve usability.
Regards,
Stefan
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
But there is a problem. I add a searchColumn component to ProductName column.
Apply these exactly:
1) Open ProductName filter and type a text like 'Chai'
2) Click the 'Search' button.
3) Now click the filter of Product Id column
It is going to crash. How do you fix that?
Here is the sample:
https://stackblitz.com/edit/react-yfm3jd?file=app%2Fmain.jsx
Hello, Furkan,
I agree that this is a critical issue and we pushed a fix now.
The fix is on a pull request and we will try to release a version in the dev channel with that fix by the end of the week.
Apologies for the inconvenience.
I also added some Telerik points to your account for letting us know about this issue.
Regards,
Stefan
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Stefan,
Did you publish the fix of this issue? How can I track it?
Thank you
Hello, Furkan,
Yes, the fix is already published in version 3.14.0.
Usually, we make a GitHub issue, but in this case, we made the fix on the next day.
I updated the example and the version.
Also when I was updating the example I thought that the filterUI can be even cleaner approach, as it will render the default filter and clear button, add some styling and we will need to only render the input box:
https://stackblitz.com/edit/react-ndss73?file=app%2Fmain.jsx
Regards,
Stefan
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.