Skip to content

Closing a modal from a cancel button causes unexpected behavior, except Escape key #147

Description

@pathros

According to the official doc ... article, I can close a modal from a button click with the following:

<button wire:click="$emit('closeModal')">Close Modal</button>

After clicking on the button, the real-time validation seems to trigger anyway and yes the modal closes. After being closed, my livewire datatable stops working.

However, (I reload the page to open again the modal) when I hit the "Escape" key to close the modal, everything is working fine after the modal is closed.

Maybe there's a bug out there?
Otherwise, is there a simple or neat way to close the modal right from clicking a "cancel" button?

Meanwhile, I have just left a help text "press escape to cancel".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions