generic Input element
i have this generic input element i register with the form, and reduces a whole lot of boilerplate, basically i pass down the field and then setup everything else as is, and is configurable from top down
the issue is that this really is only working for fields that hold string | number values in the form
i have a more complex field that's an array of objects. the field will only track one of the fields, and then i'll have basically a encode decode cycle where
input reads value from form => encode to string => onchange code reads value from input => decode and map onto object
this feels non-trivial to tack onto this generic component, and leads me to wonder if i'm overthinking it and there might be more straightforward way to handle this (without needing to recreate the below in every form field)
1 Reply
flat-fuchsiaOP•3w ago
nvm, didn't even realize there was an array mode.