Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Form.getData = form => Object.assign({},
.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.