robmarshall / gatsby-gravityforms-component

A component to take gatsby-source-gravityforms query data and return usable components
GNU General Public License v3.0
27 stars 23 forks source link

Failed prop type: Input: prop type `maxLength` is invalid #26

Closed avinoamsn closed 4 years ago

avinoamsn commented 4 years ago

Every instance of this component produces the below warning:

Warning: Failed prop type: Input: prop type `maxLength` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.
    in Input (created by FieldBuilder)
    in FieldBuilder (created by GravityFormForm)
    in form (created by GravityFormForm)
    ...

Here is a sample instance that consistently produces the warning:

<GravityFormForm
    id={1}
    formData={useGravityData()}
    lambda={process.env.GATSBY_LAMBDA_ENDPOINT}
/>

This is not a breaking issue. Maybe I am missing something, but this looks like a simple prop discrepancy bug. Documenting it here, but I may visit the code and open a PR if I have time.

robmarshall commented 4 years ago

Thanks for documenting. I have found the issue, you were right - it was a discrepancy issue. I have fixed.