Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to negate / invert ends with filter #2592

Open
0x26res opened this issue Apr 17, 2024 · 1 comment
Open

Add possibility to negate / invert ends with filter #2592

0x26res opened this issue Apr 17, 2024 · 1 comment
Labels
enhancement Feature requests or improvements question Questions about use, potential features, or improvements

Comments

@0x26res
Copy link

0x26res commented Apr 17, 2024

Feature Request

Description of Problem:

I have a table containing an id field, of type string.

I want to filter out any id that ends with a given string.

At the moment I'm only able to filter in / select id that ends with a given string.

Potential Solutions:

I can think of a few solutions:

  • allow any filter to be negated
  • add a "not ends with" filter (and do the same with starts with)
  • add a regex filter
@texodus
Copy link
Member

texodus commented Apr 17, 2024

We may add something like this in the future, for now you can achieve this by filtering on an Expression Column, e.g. for this config from our superstore example :

{
  "version": "2.10.0",
  "plugin": "Datagrid",
  "columns": [
    "State",
    "State Filter Column"
  ],
  "filter": [
    [
      "State Filter Column",
      "==",
      true
    ]
  ],
  "expressions": {
    "State Filter Column": "match(\"State\", '(as$)')"
  },
}
Screen.Recording.2024-04-17.at.4.58.17.PM.mov

@timkpaine timkpaine added enhancement Feature requests or improvements question Questions about use, potential features, or improvements labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements question Questions about use, potential features, or improvements
Projects
None yet
Development

No branches or pull requests

3 participants