Open lcundiff opened 2 years ago
When I pass in a number to initialize rating, I get this error message:
Failed prop type: Invalid prop `formik.values.rating` of type `number` supplied to `RatingsField`, expected `object`
When I pass in an object I get this error message:
Failed prop type: Invalid prop `value` of type `object` supplied to `RatingsField`, expected `number`
When I pass in null, it says that FormRatings is a required field. Is this library maintained? Used the following example code:
render(( <Formik initialValues={initialValues} onSubmit={onSubmit} > {({ errors, touched }) => ( <Form> <div> <h3>Rating (quality)</h3> <Field name="ratingQuality" as={FormRatings} /> </div> <div> <button type="submit">Save</button> </div> </Form> )} </Formik> )`
Looks like the prop type just needs to be updated here:
https://github.com/felamaslen/form-ratings/blob/587f5f15db2ebbed27ea32211ae36c66ff7d2a44/src/index.tsx#L63
Maybe RatingsField.formik could be updated to any?
RatingsField.formik
any
bump @felamaslen
any solution for this? i've same issue
When I pass in a number to initialize rating, I get this error message:
When I pass in an object I get this error message:
When I pass in null, it says that FormRatings is a required field. Is this library maintained? Used the following example code: