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

BooleanField does not propagate uiSchema prop, causing CheckboxWidget to crash #2549

Closed
henriksvensson opened this issue Sep 16, 2021 · 2 comments

Comments

@henriksvensson
Copy link

Description

When using a boolean field, the form generation using Semantic UI crashes with the following error message:

Uncaught TypeError: can't convert undefined to object
    getUiOptions utils.js:354
    getDisplayLabel utils.js:374
    CheckboxWidget CheckboxWidget.js:29
    React 12
    unstable_runWithPriority scheduler.development.js:468
    React 2
    workLoop scheduler.development.js:417
    flushWork scheduler.development.js:390
    performWorkUntilDeadline scheduler.development.js:157
    js scheduler.development.js:180
    js scheduler.development.js:645
    Webpack 20
utils.js:354

The BooleanField component that renders the CheckboxWidget does not set the uiSchema prop. My suggestion is that it is added similarly to other fields, such as StringField. That would fix this issue as well as add support for UI schema in the CheckboxWidget.

Version

"@rjsf/core": "^3.1.0"
"@rjsf/semantic-ui": "^3.1.0"
henriksvensson added a commit to hejare/react-jsonschema-form that referenced this issue Sep 16, 2021
@jacqueswho
Copy link
Contributor

@henriksvensson can this issue be closed?

@epicfaace
Copy link
Member

Yeah, looks like #2587 fixed it.

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

No branches or pull requests

3 participants