react-jsonschema-form-conditionals icon indicating copy to clipboard operation
react-jsonschema-form-conditionals copied to clipboard

rule for array item

Open nlac opened this issue 5 years ago • 0 comments

Hello, i'm wondering what rule could do the following, or even is it possible. Given a schema describing an array with any number of items (user can add items on-the-fly as usual):

{
  "type": "array",
  "items": {
    "doyoulike": {
      "type": "boolean"
    },
    "howmuch": {
      "type": "number"
    }
  }
}

and i want a rule that hides (or disables) the "howmuch" prop of ANY item where the "doyoulike" prop gets unchecked. It maybe related to https://github.com/RxNT/json-rules-engine-simplified/issues/29 that have also an upcoming story but studying that i wasn't really enlighted if doing the above is even possible right now.

nlac avatar Aug 15 '19 07:08 nlac