Due to calling plexus-objective.prune, fields with empty input fields are not returned in the output.
I think this is quite inconvenient when you are updating existing values. Once something is set, the user cannot remove it anymore. I'm not sure if it would be better to return empty strings or null/undefined, but I guess for most use cases any would do.
Another strange behaviour originating from this is I think a quite typical controlled form setup. Say you provide a values prop which is updated on submit from the form output (and submitOnChange is set). Now if there is only one (string) input field, this works until you try to delete the last remaining character in it. What (I think) happens is that the DOM value becomes the empty string, which is pruned, leading to null for the entire form output (also by pruning), which in turn makes that the values prop is ignored and the Form component state holds on to the deleted charachter which is then also rendered again.
This is also related to #7
Due to calling
plexus-objective.prune, fields with empty input fields are not returned in the output.I think this is quite inconvenient when you are updating existing values. Once something is set, the user cannot remove it anymore. I'm not sure if it would be better to return empty strings or
null/undefined, but I guess for most use cases any would do.Another strange behaviour originating from this is I think a quite typical controlled form setup. Say you provide a
valuesprop which is updated on submit from the form output (andsubmitOnChangeis set). Now if there is only one (string) input field, this works until you try to delete the last remaining character in it. What (I think) happens is that the DOM value becomes the empty string, which is pruned, leading tonullfor the entire form output (also by pruning), which in turn makes that thevaluesprop is ignored and theFormcomponent state holds on to the deleted charachter which is then also rendered again.This is also related to #7