Author Topic: Tree grid does not show data in correct sort when filter is applied  (Read 280 times)

gopigupta

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 37
    • View Profile
Hello,

I am facing issue in tree grid. Filtering column does change the sort order i.e. row position. I am able to generate same issue in demo site(https://paramquery.com/pro/demos/treegrid_filter). Below are steps to reproduce the issue.

1. Go to tree grid demo site - https://paramquery.com/pro/demos/treegrid_filter
2. Check the sort order of first column(Name). "changes.txt" is appearing above "license.txt" under parent "Apache"(Attached ScreenShot1)
3. Filter 1st column by "license.txt". Only "license.txt" will appear under parent "Apache"(Attached ScreenShot2)
4. Now, filter 1st column by word "txt". You will notice that "changes.txt" is now appearing below "license.txt" (Attached ScreenShot3)

If we remove filter then again column will appear with correct sort.

Please help to resolve this issue and do let me know if you need more info.

Thanks.
 

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6260
    • View Profile
Re: Tree grid does not show data in correct sort when filter is applied
« Reply #1 on: December 04, 2023, 01:42:27 pm »
Please use filterModel.hideRows = true
« Last Edit: December 04, 2023, 02:32:48 pm by paramvir »

gopigupta

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Tree grid does not show data in correct sort when filter is applied
« Reply #2 on: December 04, 2023, 05:09:29 pm »
Thanks for quick reply. How can we get filtered data from this.option('dataModel.data') when filterModel.hideRows is set to true.

Thanks.

gopigupta

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Tree grid does not show data in correct sort when filter is applied
« Reply #3 on: December 04, 2023, 05:37:12 pm »
I got the answer. By using pq_hidden === false.

Thanks