TI modal - "cancelCallback" parameter prevents modal closing

Issue #593 resolved
Wei Wang created an issue

When using the “cancelCallback” parameter to add a custom JS function, Apliqo appears to prevent the user from closing the modal window. For example, on the Apliqo_Demo screen below, after clicking into the TI window, either (a) clicking on the “X” or (b) running the TI and clicking “Ok” appears unresponsive. The only way to close out is to press the Esc key on the keyboard.

If it is intended to turn everything over to the custom JS function, could you please share the code we can add to the end of our custom JS to dismiss the modal window? Thanks!

Comments (7)

  1. Wei Wang reporter

    Thanks for the update Ada! In the interim, do you know if anyone on the team can suggest a line of code that we can add to the end of our custom JS function to close out of the modal window? We have also noticed a similar issue with using the “callback” option for “success” and “failed” under “statusNotifications” (i.e., after running the TI, we cannot close out of the modal).

  2. Ilia Shapiro

    You need to return true inside the custom function since the promise is waiting for a return result

    demoProcessCancelCallback() {
            alert("With the advanced option cancelCallback you can trigger any JavaScript function when the user clicks the cancel button. The function is defined in custom-functions.service.js");
            return true
        }
    

  3. Ilia Shapiro

    add return true or return false in the any call back for success or failed under statusNotifications to either close the modal or keep it opened

  4. Log in to comment