In 5.x.x it was possible to get the valid or invalid prop (and other props) from another field. I have Birthdate-component, with 3 separate fields. I used to have an onKeyUp function to auto-tab to the next field when the current value was valid. From what I see, this isn't possible anymore.
I used to do something like this:
_handleKeyDown = (e) => {
const { target } = e;
if (!this.props.fields[target.name].valid) return;
if (
target.value.length === target.maxLength &&
e.keyCode !== 8 && // backspace
nextInput
) {
nextInput.focus();
}
Long story short, I just want to be able to get the props used in 5.x.x for each field used in my form.
Also concerned about this - how can you even build highly dynamic and powerful forms if you cant even know any details about any other field?
@ashwinvandijk you can do this with getFormSyncErrors
selector, eg
if ( getFormSyncErrors( formName )( state ).fieldName ) return;
@bradennapier feel free to submit PRs to whatever you think should be improved.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Also concerned about this - how can you even build highly dynamic and powerful forms if you cant even know any details about any other field?