Author Topic: Filter not working pivot mode  (Read 2045 times)

EPM Solutions

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 182
    • View Profile
Filter not working pivot mode
« on: November 02, 2018, 12:44:04 pm »
Hello Team,
We created 3 filters for our grid. Department, Roles and Program. In normal mode all filters are working but in pivot mode filters not showing correct result.
For Your Testing we created a plnkr.

Plnkr URL: (In not loading click on refresh icon)
https://next.plnkr.co/edit/JsxFx9O6S7GqdCEI

1.   Roles filter is multi select filter
2.   On select department filter we initialize Program and Roles filter. And showing records only for selected department and if any filter applied on Program and role we removed the filter from both the filters.

3.   On select program initializing Roles filter. Showing result according to Department filter and Program filter and if filter is applied on roles we removed filter for role.
In Normal grid mode all filters are working fine.
In Pivot mode if we select role multi select filter and try to use department filter. Filter is not showing correct result.

For Checking the issue follow below:
1.   On load all the records loading in the grid
2.   Selecting Parks from department filter showing records only for department park and initialize roles filter according to filter records.
3.   Now select role from role filter will show the correct result
4.   Now selecting All department from department filter will show correct result in the normal mode but in Pivot mode result not showing correctly. Also, In Pivot mode department filter not behave correctly.

Please check and give your feedback.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6297
    • View Profile
Re: Filter not working pivot mode
« Reply #1 on: November 05, 2018, 02:42:38 pm »
Thanks for the plnkr but could you please keep the test case small.

There are around 1000 lines of code and it's difficult to locate the source code related to issue.

And here is the example of using filter with pivot for reference:

https://paramquery.com/pro/demos/pivot
« Last Edit: November 05, 2018, 03:13:46 pm by paramquery »

EPM Solutions

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 182
    • View Profile
Re: Filter not working pivot mode
« Reply #2 on: November 16, 2018, 09:39:40 am »
Hello Team,

Thanks,

We tried to remove or separate some line of code so it will be easy to understand our issue.

Plnkr URL:
https://next.plnkr.co/edit/JsxFx9O6S7GqdCEI?preview

For Checking the issue follow below:
1.   On load all the records loading in the grid
2.   Selecting Parks from department filter showing records only for department park and initialize roles filter according to filter records.
3.   Now select role from role filter will show the correct result
4.   Now selecting All department from department filter will show correct result in the normal mode but in Pivot mode result not showing correctly. Also, In Pivot mode department filter not behave correctly.

Above step should replace the current filter and show only the result for department filter.



paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6297
    • View Profile
Re: Filter not working pivot mode
« Reply #3 on: November 16, 2018, 10:43:41 am »
Your case requires use of oper: 'replace' in the filter() API method.

and statements like these not required

ownerColumn.filter = '';
roleColumn.filter = '';

since oper: 'replace' takes care of that.

https://next.plnkr.co/edit/JQVjuolBkvtF6ZUu