Skip to content

Trying to add custom operator similar to notNull #220

Answered by jakeboone02
Mvin asked this question in Q&A
Discussion options

You must be logged in to vote

There are a couple of ways to do it. The demo code shows how to create a field with "is" as the only operator and a checkbox as the value component (see valueEditorType: 'checkbox'). In that case, checked = true and unchecked = false. This method uses the default ValueEditor component so there's minimal configuration necessary.

The other way is to do it as you describe, with the operators "is true" and "is false" but no value editor. That way is a little more complicated. You'll need to set up a custom ValueEditor component that returns null for those specific operators. If you're using the formatQuery method, you'll also need to set up a custom valueProcessor function to take care of the…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mvin
Comment options

Answer selected by Mvin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants