Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Form.getData = form => Object.assign({},
...Object.entries(Form.getProps(form).fields)
.filter(([fieldKey, field]) => !field.disabled)
.filter(([fieldKey, field]) =>
!['checkbox', 'radio'].includes(field.type) || field.checked
)
.map(([fieldKey, field]) => ({ [fieldKey]: field.value })),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.