@doodl/react-forms
v1.3.6
Published
New, improved React Forms library. Compatible with SilverStripe, GraphQL and NextJS
Downloads
108
Readme
Each client must be must have a fields array that has an object of { component: Component, props: { value: "foo", name: "bar"} }
props can have { required: true || false, callbacks: [String] }
callbacks should be passed in by the form loader. If you want something to be called on every instantiation of a certain field you can pass in a string key for that field and hook. If you want it on only certain instantiations the key will need to be sent via the backend, something like { uploadField: { callbacks: ["afterprocess" => "doFooBar"] } }
!Differences between implementations!
The graphql loader does not handle redirects - could create some default apollo middleware for this