Filter plugin: support operator choice

Created on 22 August 2023, 10 months ago
Updated 5 September 2023, 10 months ago

Problem/Motivation

There is the possibility to choose the operator but the not in is not supported by the code.

Proposed resolution

Adapt logic depending on the operator.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Grimreaper
  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Note: it would be nice to publish the dev version of the 2.0.x branch so issues can target it and so the branch will automatically be created when creating issue fork.

  • @grimreaper opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Attaching patch for composer usage.

    Thanks for the review.

  • πŸ‡ΊπŸ‡ΈUnited States andileco

    Thank you for this patch. The code looks good on the surface. Can you explain your use-case a little more so that I could try to replicate the issue?

    I will create a dev branch.

  • Status changed to Fixed 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States andileco
  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Hi @andileco,

    Wow, thanks for the quick merge and new release!

    My use case is: I have an user admin view with like 15 fields/columns, and wanted to either have some columns hidden by default then being able to display it or all columns displayed by default and I want to be able hide some.

    I think the first scenario "hidden then displayed" is not possible with the module, or I missed something.

    So in the second scenario "displayed then hidden", as the checkboxes (of the columns I restrict the options to) are unchecked by default, and when no checkboxes are checked all columns are displayed, having a logic of "choose which one to display" was not possible, so I ended up with the logic of "select which one you want to hide" so with the operator "not in" which was not working.

    It is the first time I use this module, so I may have missed some config options?

    If my scenario is not clear (which can easily be ^^), I can make a video recording.

  • πŸ‡ΊπŸ‡ΈUnited States andileco

    Hi @Grimreaper - I've uploaded a video of how it worked previously and then how it works now with the new release (your patch).

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Hi @andileco,

    Thanks a lot for the nice video.

    So it confirms that "hidden then displayed" is not possible, only "Displayed then hidden". And now it is either choosing with fields to keep displayed or hide.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024