We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Short description of what this feature will allow to do:
In assets/js/field-boolean.js it would be great if the Promise could dispatch a "subscribable" event:
assets/js/field-boolean.js
Replace
.then(() => { /* do nothing else when the toggle request is successful */ }) .catch(() => this.#disableField());
by
.then((responseText) => { document.dispatchEvent(new CustomEvent('ea.form.ajax.switch', { cancelable: true, detail: { response: responseText, field: this.field, error: null} })); }) .catch((reason) => { this.#disableField(); document.dispatchEvent(new CustomEvent('ea.form.ajax.switch', { cancelable: true, detail: { response: null, field: this.field, error: reason} })); });
What do you thing @javiereguiluz ?
So we can customize the behavior (e.g: with a toaster) and subscribe to the event as we would like to
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Short description of what this feature will allow to do:
In
assets/js/field-boolean.js
it would be great if the Promise could dispatch a "subscribable" event:Replace
by
What do you thing @javiereguiluz ?
So we can customize the behavior (e.g: with a toaster) and subscribe to the event as we would like to
The text was updated successfully, but these errors were encountered: