Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

I apologize for taking so long to respond! My recommendation would actually be the same as your last suggestion, storing an object in the value field. A query would end up looking something like this, I presume:

const query: RuleGroupType = {
  combinator: "and",
  rules: [
    {
      field: "category.google.id",
      operator: "exists", // or whatever
      value: {
        categoryMinScore: 0.5,
        values: ["one", "two", "etc"]
      }
    }
  ]
}

You're right that it's a bigger hassle, but usually it's not much more than this:

const MyValueEditor = (props: ValueEditorProps) => {
  const updateValue = (k: string, v: any) => {
    props.handleOnChange({ ...props.value, [k]: v });
  }

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@philicious
Comment options

@jakeboone02
Comment options

Answer selected by philicious
@philicious
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants