ref(feedback): emit api feedback submitted on completion (#4499)
* ref(feedback): emit api feedback submitted on completion Compared to firing the event on submission because the submission ajax will not be completed at that time.. * squash: update package.json
This commit is contained in:
@@ -627,10 +627,14 @@ class API {
|
||||
* has been submitted. Intended to be used in conjunction with the
|
||||
* submit-feedback command to get notified if feedback was submitted.
|
||||
*
|
||||
* @param {string} error - A failure message, if any.
|
||||
* @returns {void}
|
||||
*/
|
||||
notifyFeedbackSubmitted() {
|
||||
this._sendEvent({ name: 'feedback-submitted' });
|
||||
notifyFeedbackSubmitted(error: string) {
|
||||
this._sendEvent({
|
||||
name: 'feedback-submitted',
|
||||
error
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user