Closed d6p2b closed 6 months ago
Hi @d6p2b, i was able to replicate the problem you are describing, will send it to the team so they can take a look.
Thanks for the report!
Hi @d6p2b, thanks for the bug report! Due to the way action blocks are coded, this is intentional behavior. Action blocks are stored completely separately from the action chain itself, so if you take a look at the code the button you have provided, you'll see the action block getting called before the snack bar shows up. Since the "terminate" is just a return
statement, the action block terminates from the return
(thus causing the action block to be terminated), and then the next action is called afterwards (in this case, the snack bar). Hope this clears things up for you. Thanks!
Has your issue been reported?
Current Behavior
A "terminate" action in part of an action block doesn't stop an action flow which includes the action block.
Expected Behavior
The "terminate" should stop the entire action flow.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT4Cl/KB249OxLlE7ZDAb/owvyQsH1whRY0NmtVHawIaJ5PMC+wIZ/f7XFRuTde0SlFMfWKjjj41w+/emvz1A/cEAxyec4Q71ZFQcjvMLU+jWr61CKm0R25/DdxbN2XF5ruzoRUmKsRtWkI4206qG+u+d3fvNITJDVc8ReW1C5CK2SrDX1iXc2URm05KZDPz
Context
My project has forms where the nice user might be tempted to navigate away from a page with unsaved changes using several different flows. I want to have a single action block to insert in all the navigation actions to warn the user about the unsaved changes and offer a chance to stop the navigation. Since the "terminate" doesn't stop the "parent" action, the user has no chance to stop the navigation.
Visual documentation
Additional Info
No response
Environment
General
Relative to the time the changes were made, data was lost within
When following my steps to reproduce, data loss happens