primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.93k stars 1.25k forks source link

Local filters do not work properly on TreeTable when there are repeated child values on different nodes #387

Closed jehupacheco closed 4 years ago

jehupacheco commented 4 years ago

Local filter does not work properly on TreeTable when filtering by a repeated value on children nodes (although keys are unique)

This is the data passed to node:

 [
  {
    "key": "applications",
    "data": {
      "label": "Applications",
      "size": '100MB',
    },
    "children": [
      {
        "key": "applications-finder",
        "data": {
          "label": "Finder",
          "size": "70MB",
        }
      },
      {
        "key": "applications-photobooth",
        "data": {
          "label": "PhotoBooth",
          "size": "30MB",
        }
      }
    ],
  },
  {
    "key": "pictures",
    "data": {
      "label": "Pictures",
      "size": "3MB",
    },
    "children": [
      {
        "key": "pictures-finder",
        "data": {
          "label": "Finder",
          "size": "2MB",
        }
      },
      {
        "key": "pictures-lena",
        "data": {
          "label": "Lena",
          "size": "1MB",
        }
      }
    ],
  }
]

When filtering by a non-repeated value, everything works as expected

image

However, when filtering by a value that exists in more that one node, the table shows all the value (despite matching or not the filter)

image

Here is a fiddle that replicates the issue https://jsfiddle.net/w5rq4dej/21/

cagataycivici commented 4 years ago

@mertsincan Wdyt?

cagataycivici commented 4 years ago

May be fixed by;

https://github.com/primefaces/primevue/issues/424