Skip to content

Commit

Permalink
Add missing ajaxDone in global events (#194)
Browse files Browse the repository at this point in the history
* add ajaxDone in global events

* Update snowboard/request.md

---------

Co-authored-by: Ben Thomson <[email protected]>
  • Loading branch information
mjauvin and bennothommo authored Jun 24, 2024
1 parent b0751ee commit 0c645bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions snowboard/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Event | Promise? | Parameters | Description
`ajaxUpdateComplete` | No | `(array of HTMLElement) elements, (Request) request)` | Called when the partials are updated. It can be used to determine which partials have been updated. This event cannot be cancelled.
`ajaxSuccess` | No | `(Object) responseData, (Request) request` | Called when a successful response is returned and all partial updating is completed. It can be used to cancel further response handling (ie. redirects, flash messages). Returning `false` in any event listeners will prevent any further response handling from taking place.
`ajaxError` | No | `(Object) responseData, (Request) request` | Called when an unsuccessful response is returned from the AJAX request. It can be used to cancel further error handling. Returning `false` in any event listeners will prevent any further response handling from taking place.
`ajaxDone` | No | `(Object) responseData, (Request) request` | Called when the AJAX request and all response handling is complete, for both a successful or a failed request. This can be useful to clean up after an AJAX request, such as removing loading indicators.
`ajaxRedirect` | No | `(string) redirectUrl, (Request) request` | Called when a redirect is to take place, either from the response or through the `redirect` option. Returning `false` in any event listeners will prevent the redirect from executing.
`ajaxErrorMessage` | No | `(string) message, (Request) request` | Called when an error message is to be shown to the user. Returning `false` in any event listeners will prevent the default error handling (showing an alert to the user) from executing.
`ajaxFlashMessages` | No | `(array of Object) flashMessages, (Request) request` | Called when one or more flash messages are to be shown to the user. There is no default functionality for flash messages, so if no event listeners trigger for this event, no activity will occur.
Expand Down

0 comments on commit 0c645bd

Please sign in to comment.