teslamotors / informed

A lightweight framework and utility for building powerful forms in React applications
https://teslamotors.github.io/informed
MIT License
942 stars 172 forks source link

FormApi doesn't have all the required methods in pwa-studio #295

Closed multidimensionro closed 3 years ago

multidimensionro commented 4 years ago

Hi,

I have an issue in a UI component in venia-ui (built with pwa-studio), for the pwa-studio Magento 2 storefront.

When I am accesing formApi via useFormApi(), I only have two methods available: getFullField and getValues available. All the others are undefined.

Any ideas why that might happen?

Best regards, Darius-Sorin Bodescu

multidimensionro commented 4 years ago

I fixed it by creating a separate component for the submit button and moving everything relevant to the formApi into that.

Would be nice to know why that works like that, as for me it makes no sense.