Is return data of GridColumnMenuCheckboxFilter changed?

7 posts, 1 answers
  1. Furkan
    Furkan avatar
    18 posts
    Member since:
    Mar 2020

    Posted 04 May 2020 Link to this post

    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?

  2. Furkan
    Furkan avatar
    18 posts
    Member since:
    Mar 2020

    Posted 04 May 2020 in reply to Furkan Link to this post

    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;
    }
  3. Stefan
    Admin
    Stefan avatar
    3039 posts

    Posted 05 May 2020 Link to this post

    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

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  4. Furkan
    Furkan avatar
    18 posts
    Member since:
    Mar 2020

    Posted 05 May 2020 in reply to Stefan Link to this post

    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

  5. Stefan
    Admin
    Stefan avatar
    3039 posts

    Posted 06 May 2020 Link to this post

    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

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  6. Furkan
    Furkan avatar
    18 posts
    Member since:
    Mar 2020

    Posted 15 May 2020 in reply to Stefan Link to this post

    Hi Stefan,

    Did you publish the fix of this issue? How can I track it?

    Thank you

  7. Answer
    Stefan
    Admin
    Stefan avatar
    3039 posts

    Posted 18 May 2020 Link to this post

    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

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top