React-jsonschema-form: hide title on checkboxes widget

Created on 7 Apr 2018  路  3Comments  路  Source: rjsf-team/react-jsonschema-form

Hi,
How to disable title in Array ?

schema:

"multipleChoicesList": {
      "type": "array",
       // "title": "A multiple choices list",
      "items": {
        "type": "string",
        "enum": [
          "foo",
          "bar",
          "fuzz",
          "qux"
        ]
      },
      "uniqueItems": true
    },

schemaUi :

"multipleChoicesList": {
"ui:widget": "checkboxes",
        "ui:options": {
            label: false,
            title: false,
            inline: true
        }
}

but a title always drop with "multipleChoicesList" text. How can I disable title?

question

All 3 comments

+1 for this. I am also facing the same issue. @mammad2c did you find a solution for this?

You can give it a className such as hidden-title, and then in your css do:

.hidden-title label.control-label {
  display: none;
}

See this fiddle for an example: https://jsfiddle.net/epicfaace/kvu1gxct/

You can actually use the ui:label option to hide labels by default. https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/uiSchema/#label

Was this page helpful?
0 / 5 - 0 ratings