moonshine icon indicating copy to clipboard operation
moonshine copied to clipboard

updateOnPreview does not display any feedback when the network is lost

Open iPabro opened this issue 5 months ago • 0 comments

MoonShine Version

2.22.1

Laravel Version

v10.48.20

PHP Version

8.2.10

Database Driver & Version

No response

Description

I encountered an issue with the updateOnPreview functionality. When there is a network loss and a field is updated, no message or feedback is shown in the preview pop-up. As a result, the changes are not saved, and the user is unaware of this issue.

Steps To Reproduce

Here is the code I'm using:

Text::make('domain')
    ->updateOnPreview(events: [
        AlpineJs::event(JsEvent::TOAST, params: ['text' => 'Success', 'type' => 'success'])
    ]);

To reproduce this issue:

In Chrome, open the Developer Tools panel. Disable the network connection. Try to change the value of the field.

Expected Behavior:

A notification or message should appear indicating that the changes could not be saved due to network issues.

iPabro avatar Sep 12 '24 13:09 iPabro