Searchbuilder "array" column returns no results when filtering on "equals" with multiple values

Searchbuilder "array" column returns no results when filtering on "equals" with multiple values

abluxmiabluxmi Posts: 2Questions: 1Answers: 0

Link to test case: https://datatables.net/extensions/searchbuilder/examples/customisation/renderArrays.html
Debugger code (debug.datatables.net): N/A
Error messages shown: N/A
Description of problem:

I've had a brief search through the questions and hadn't seen this raised, apologies if it already has been.

I was aware there was a fix recently for supporting "equals" in searchbuilder when the column was an array - https://github.com/DataTables/SearchBuilder/pull/25 - but it looks like there's still an issue when using "equals" for rows with multiple values.

In the "render arrays" example linked above, if you select data "Permissions", then condition "Equals" and select any value that has more than one permission then no results are shown.

Thanks - appreciate how much work you put into this!

This question has an accepted answers - jump to answer

Answers

  • chocchoc Posts: 131Questions: 13Answers: 12

    Hi, thanks for reporting the bug. I found the cause of this issue.

    I'll push a new patch for this. My last PR only fixes the search function. However, this issue with multiple items occurs before the search function is called.

  • chocchoc Posts: 131Questions: 13Answers: 12
    Answer ✓
  • allanallan Posts: 65,421Questions: 1Answers: 10,864 Site admin

    @choc - Many thanks for the PR! That's it merged in now.

    I do need to look into this aspect of SP a bit more. I think I've mentioned in the past that it is overdue for a rewrite - I'll get to it one day...!

    Allan

  • abluxmiabluxmi Posts: 2Questions: 1Answers: 0

    Thanks for the quick reply and fix - really appreciated! :)

Sign In or Register to comment.