Expected Behavior
Do not send a missing this.args.onClicked warning if component is used as button[type=submit].
Actual Behavior
A warning is sent for a missing this.args.onClicked function even if it's not necessary.
|
if(!this.args.onClicked) { |
|
// eslint-disable-next-line no-console |
|
console.warn(new Error('Button created with no onClicked')); |
|
} else { |
|
this._onClicked = this.args.onClicked; |
|
} |
Steps to Reproduce
Add an es-button component with @type=submit and no @onClicked.
<EsButton @type="submit" @label="Search" />
Screenshot
