-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimistic mode #5799
Optimistic mode #5799
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good!
packages/ra-core/src/dataProvider/getDataProviderCallArguments.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way better!
Switching to RFR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome :)
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
Problem
The
undoable
mode is optimistic AND undoable. React-admin offers no way to use the dataProvider in an optimistic and non-unduable way.Solution
Replace the 'undoable' boolean option in useDataProvider by a fetch mode the can be one of 'regular', 'optimistic', and 'undoable'. Implement that fetch mode in
useDataProvider
.Closes #5133, supersedes #5258
Example usage
Tasks