Setting variant options for all inputs

jsonforms isn’t a known property of the createMuiTheme options :frowning:

This is just an incorrect typing problem. You can specify jsonforms and it works fine.

But why don’t JSONForms inputs simply listen to a MUI Theme

JSON Forms renders standard Material UI components and therefore they also react to the MuiTheme. However we don’t use MuiTextFields, which is why your customization doesn’t work.

[Octopixell]

@sdirix(sdirix) I guess that means I should then create a custom Control renderer to replace all normal text fields with a MuiTextField? What component do you guys use instead? Perhaps that has the variant property too.

[Octopixell]

Also, is there a default way to handle arrays with strings using a Multiple Select component (React Select component - Material-UI) ?

[Octopixell]

Or any other way handling a field with type string[]

[Octopixell]

The allowed string values in the field are known like an enum

[Octopixell]

Trying to create a custom Control but I can’t find any documentation on the Tester part? It requires a tester but what is actually expected I can’t find out…

[Octopixell]

Like in my data schema I have a property:

"tabs": {
                  "type": "array",
                  "enum": [
                    "schedule",
                    "requests",
                    "menu",
                    "availability",
                    "balance",
                    "contracts"
                  ]
                }

How would I write a tester to match this type of property?

[Octopixell]

Seems I found the solution:

"tabs": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "schedule",
                      "requests",
                      "menu",
                      "availability",
                      "balance",
                      "contracts",
                      "selfScheduling"
                    ]
                  }
                }

[Octopixell]

One thing i’m wondering, can i define it as {“label”: “Whatever label”, “value”: “actualValue”} somehow?

[Octopixell]

[Octopixell]

And I’m wondering if we can get rid of this type error? It’s kind of annoying having our IDE’s constantly show there’s errors in the file when the code compiles just fine…