Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap-4 theme does not render array with different item types #2775

Closed
3 tasks done
rkeulemans opened this issue Mar 23, 2022 · 1 comment
Closed
3 tasks done
Labels
bootstrap-4 bootstrap-4 related theme issue bug

Comments

@rkeulemans
Copy link

Prerequisites

Description

The bootstrap-4 theme does not render when using this schema, while the core does this perfectly fine (see Codesandbox)

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Name Registration Form",
  "type": "object",
  "required": [
      "full_name"
  ],
  "properties": {
      "full_name": {
          "title": "Full Name",
          "description": "Please provide your full name",
          "type": "array",
          "items": [
              {
                  "type": "string"
              },
              {
                  "type": "string"
              }
          ],
          "maxItems": 2,
          "minItems": 2
      }
  }
}

Steps to Reproduce

Run Codesandbox.

Expected behavior

Renders the schema in the UI.

Actual behavior

Does not render schema and presents an error:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `ArrayFieldDescription`.

Version

You can usually get this information in your package.json or in the file URL if you're using the unpkg one:

  "dependencies": {
    "@rjsf/core": "4.1.0",
    "@rjsf/bootstrap-4": "4.1.0",
    "react-bootstrap": "1.6.4",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-scripts": "4.0.3"
  },
@jacqueswho jacqueswho added bug bootstrap-4 bootstrap-4 related theme issue labels Apr 7, 2022
@heath-freenome
Copy link
Member

Fixed in the v5 beta, see the 5.x migration guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bootstrap-4 bootstrap-4 related theme issue bug
Projects
None yet
Development

No branches or pull requests

3 participants