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

fix bool prop-types #425

Closed
wants to merge 1 commit into from
Closed

Conversation

madflow
Copy link

@madflow madflow commented Jan 11, 2022

Currently we get:

Failed prop type: Form: prop type options.readOnly is invalid; it must be a function, usually from the prop-types package, but received undefined.

When using the Form component. This can be mitigated by changing the Boolean proptypes to the correct (?) bool constant.

https:/facebook/prop-types

facebook/prop-types#368

@simonv3
Copy link

simonv3 commented Jan 17, 2022

We started seeing this when we migrated to React 17 I think.

@Beatusvir
Copy link

@madflow ohhh thats the issue? hahaha I've been trying to fix this for a couple of hours, I noticed the boolean but didnt realize the name was wrong.

@WesleyKapow
Copy link

Just hit this, in order to get it working without setting up a fork, I did the following:

Form.propTypes.options = PropTypes.shape({
    readOnly: PropTypes.bool,
    noAlerts: PropTypes.bool,
    i18n: PropTypes.object,
    template: PropTypes.string,
    saveDraft: PropTypes.bool,
})

@gokhancetiner
Copy link

Hello,

Does anybody have an idea when this PR will merge?

Thanks

@jafin
Copy link
Contributor

jafin commented May 23, 2022

@gokhancetiner looks like a duplicate of this PR was merged 3 days ago #449

@TanyaGashtold
Copy link
Contributor

Already fixed with #449

franke-mc added a commit to m-creations/react-formio that referenced this pull request Nov 22, 2023
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

Successfully merging this pull request may close these issues.

7 participants