Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
block: false
}),
new TextField({ name: 'lastName', label: 'Last Name', required: true }),
new EmailField({ name: 'email', label: 'Email' }),
new ButtonField({
name: 'import',
label: 'Import',
icon: 'ImportContacts'
}),
new ButtonField({
name: 'submit',
label: 'Submit',
type: 'submit',
icon: 'Save'
}),
new ButtonField({ name: 'cancel', label: 'Cancel', icon: 'Cancel' })
]
});
this.on('import', () => {
this.setValues({
firstName: 'Prince',
lastName: 'Nelson',
email: 'prince@example.com'
});
});
this.on('submit', () => {
// TODO: do something like contact an API
const values = this.getValues();
console.log('submitting', values);