Skip to content

Support for Promise in beforeUrlChange #422

Open
@www-chique

Description

@www-chique

I would love to have support for Promise in $beforeUrlChange.

Currently, in a "form", I look if the form has some changes, and if yes, I show a dialog which returns a promise, that resolves after user's choice of whether to discard the change.
It's pretty neat to wait for that response before I can return the $beforeUrlChange a "true" or "false".

Surprisingly, I am already using an asynchronous function there, but it pops out an incorrect type warning.
I am not sure whether it's merely a fix for the types or actually needs to support in the codebase.

image

I am happy to provide more details as needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions