You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, successMessage / errorMessage is a string that we setup when we define an action. However there can be multiple reasons why an action fails. It would be great to be able to return a custom success / error message from the action method itself
Basic Example
For instance, trying to call a "sendEmail" method on a non paying user could fail with a message "This user is non paying, can't send email"
Drawbacks
No response
Unresolved questions
No response
The text was updated successfully, but these errors were encountered:
We've just added these features, you can now use the previous system to display messages, and a new one based on the return (MessageData) of the action function or thrown error during its execution. Dialog actions can now also display a message on their closing by using a MessageData object and passing it to the onClose function in the component.
The new v6.1.0 is available, feel free to give another feedback 🚀
Summary
Right now,
successMessage
/errorMessage
is a string that we setup when we define an action. However there can be multiple reasons why an action fails. It would be great to be able to return a custom success / error message from theaction
method itselfBasic Example
For instance, trying to call a "sendEmail" method on a non paying user could fail with a message "This user is non paying, can't send email"
Drawbacks
No response
Unresolved questions
No response
The text was updated successfully, but these errors were encountered: