Clear filter button does not clear filter

Posted by: nilesh_nichal on 15 October 2017, 5:40 am EST

    • Post Options:
    • Link

    Posted 15 October 2017, 5:40 am EST

    Hi,

    We are using FlexGridFilter with flexgrid as given in link -http://demos.wijmo.com/5/Angular2/FlexGridFilter/FlexGridFilter/

    We are facing an issue that, clear button on filter does not work when previous filter result is empty.

    Steps:

    1. Grid is populated with data(Server side pagination).
    2. Click on filter option in column header, enter any characters in such a way that filter result will be empty. Click on “Apply” button.
    3. Again click on filter option on same column, now click on “Clear” button to clear filter. It is not working.

    Please help.

    Thanks,

    Nilesh

  • Posted 15 October 2017, 5:36 pm EST

    Hi Nilesh,

    Thank you for reporting the issue,however I am unable to replicate the issue at my end with the samples given at : http://demos.wijmo.com/5/Angular2/FlexGridFilter/FlexGridFilter/ and http://demos.wijmo.com/5/Angular2/ServerCollectionView/ServerCollectionView/

    Here are the steps that I have performed

    1. Click on Filter Icon on Column ( Country) and then select Filter By Condition
    2. Set Condition as Equals and set Value as A
    3. The FlexGrid display no rows
    4. Open the Filter again and clear.

    Could you please send me a small sample to replicate the issue so that I can investigate this further. In case I have missed anything then please let me know,

    Thanks,

    Abhishek

  • Posted 16 October 2017, 9:41 pm EST

    Hi Abhishek,

    Thanks for the input Abhishek. Clear filter button do not work for Filter type - Filter By Value.

    We tried same steps with grid in link - http://demos.wijmo.com/5/Angular2/ServerCollectionView/ServerCollectionView/

    Could you please check once and if you need more information please let us know.

    Thanks,

    Nilesh

  • Posted 17 October 2017, 4:16 pm EST

    Hi Nilesh,

    I have checked the Filter By Value condition as well and get the same observation. If I enter values which result in the Filter Panel to display no rows then it has no effect on the number of Rows that are shown in the Grid. I.e the Grid will display rows as no condition satisfies the Filter Condition.

    After I clear the Filter, then also the results remain the same. I have attached a GIF file to show the steps that I have performed to replicate the issue.

    Could you please let me know what I am doing differently and if possible elaborate the steps in details so that we can replicate this at our end and suggest a suitable solution.

    Thanks,

    Abhishek

  • Posted 22 October 2017, 2:21 am EST

    Hi Abhishek,

    I watched the attached GIF.

    Actually we are using server-side filtering with wijmo Filter type - Filter By Value and when user searches for something which results in empty data, grid is displayed as empty, as there is no data returned by the API. Now when user clicks on the clear filter button, filter text box must get cleared and filter change event must be raised to make an API call(from within ServerCollectionView, with empty filter text as query string parameter) to get initial data.

    In our case, on clear filter button click, filter text box is not getting cleared and filter change event is not happening to make an API call to get the initial data. This is happening only when grid has no data.

    Please let me know if you need more information.

    Thanks,

    Nilesh

  • Posted 22 October 2017, 10:00 pm EST

    Hi Nilesh,

    Did you try filterApplied or filterChanged event? If yes, this is still not working, please share a sample depicting the issue for further investigation.

    ~Manish

  • Posted 23 October 2017, 10:13 pm EST

    Hi Manish,

    Answer for your question-

    Did you try filterApplied or filterChanged event?

    • No, we are not handling any event explicitly, filterDefinition setter from ServerCollectionView is called when user clicks on apply filter or clear filter button, which calls _getData() to get the data from API.

    Please give us some time to create a sample project for you, below are the steps which we are following-

    1. We are using ServerCollectionView to achieve lazy loading as suggested in the link http://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/ServerCollectionView/Angular2/Code. We have done some code changes according to our need, to send data to API and processing response data.
    2. To add filter on grid column header we used FlexGridFilter component with Filter type - Filter By Value (as suggested in the link. point 1).
    3. On grid, Select filter option on column say “LastName”, enter value say “123” in filter text box and click on apply button, filterDefinition setter in ServerCollectionView sets filter data as {“filterParams”:[{“attr”:“lastName”,“value”:“123”}]} and _getData() method is called from filterDefinition setter to get the data. This filter data is passes as parameter to API which is called from _getData().
    4. Now consider result of previous filter operation is empty, grid will not display any row except column header, Again click on filter option on column “LastName”, then click on clear filter button, it should clear filter text box and set the filter definition as {“filterParams”:[{“attrPath”:“lastName”,“value”:“”}]} and _getData() must be called. (Here clear filter is not clearing the filter text box and filterDefinition setter is not getting called).

    Can you please try above approach, to reproduce same issue at your end.

    Please let us know if you have any solution.

    Thanks,

    Nilesh

  • Posted 24 October 2017, 6:01 pm EST

    HI Nilesh,

    If you could specify the changes made or provide changes file, we will be able to replicate the issue at our end and investigate the issue.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels