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

fzaninotto picture fzaninotto  路  3Comments

alukito picture alukito  路  3Comments

phacks picture phacks  路  3Comments

Dragomir-Ivanov picture Dragomir-Ivanov  路  3Comments

kdabir picture kdabir  路  3Comments