You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React component architecture: similarly to the PHP FormFields, these React components all read from initial JSON value prop or state values, and store the state value in a hidden input as serialised JSON. We could centralise some of this logic too, potentially with an HOC, helper functions in a separate file or even a parent component.
Yeah that seems like a pretty quick win to me. Updating the value might be a little more ambiguous though I guess. It'll be a bit like redux-form where the HOC has to supply an onChange prop that can be used to mutate the value of the field somehow.
Summary
This module consists of a number of form fields that read, parse, and present JSON blobs in a view - which then has a number of operable elements that can configure that blob and save it back to the system as a form submission.
There are common elements in this in that there is
the initial load of JSON data
saving JSON data
interaction elements to configure that JSON blob
At least two of these three points could be abstracted to use the same logic (loading & saving), and perhaps helpers could be made for the third point if it is not already a part of the saving logic.
The text was updated successfully, but these errors were encountered:
I think it's not necessary now, but I don't think it's worth closing either (unless as @ScopeyNZ says, it's moved to silverstripe/admin instead). It's certainly something that should be tracked.
From point 6 in #57
@robbieaverill suggests
@ScopeyNZ thinks this is a good idea
Summary
This module consists of a number of form fields that read, parse, and present JSON blobs in a view - which then has a number of operable elements that can configure that blob and save it back to the system as a form submission.
There are common elements in this in that there is
At least two of these three points could be abstracted to use the same logic (loading & saving), and perhaps helpers could be made for the third point if it is not already a part of the saving logic.
The text was updated successfully, but these errors were encountered: