React-admin: Display a warning when closing tab while optimistic update is waiting

Created on 24 May 2018  路  4Comments  路  Source: marmelab/react-admin

Optimistic updates aren't sent to the server until the undo delay expires. If, within this delay, the user closes the browser window/tab, the update is lost.

In this case, the admin should display an alert, and allow to cancel the browser close.

enhancement

Most helpful comment

Is there any way to disable the optimistic rendering entirely? I'm considering using react-admin for an open-source database administration U.I, but don't like the idea of database operators not getting immediate feedback

All 4 comments

Another scenario is if a user switches tabs or clicks out of their window, the notification never closes. They might leave for the day, assume it completed because the notification said it was updated and won't know that it never went through. Because of this possibility, there is some local caution for enabling optimistic rendering.

Is there any way to disable the optimistic rendering entirely? I'm considering using react-admin for an open-source database administration U.I, but don't like the idea of database operators not getting immediate feedback

@richardartoul No, we haven't built such an option. But it can be overridden by hand.

Fixed by #2784

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olegweb picture olegweb  路  23Comments

saf-1 picture saf-1  路  20Comments

jpetitcolas picture jpetitcolas  路  25Comments

ragboyjr picture ragboyjr  路  29Comments

fzaninotto picture fzaninotto  路  79Comments