Skip to content
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

Make refreshView call in useDataProvider.performUndoableQuery optional #4453

Closed
robert-armstrong opened this issue Feb 26, 2020 · 1 comment

Comments

@robert-armstrong
Copy link

robert-armstrong commented Feb 26, 2020

Is your feature request related to a problem? Please describe.
I have stateful buttons and tag widgets on entities in list views. These controls use optimistic rendering which eventually triggers a full refresh here after the client change and server update. The refreshView call seems unnecessary for my use case and also causes the vertical scroll to jump.

Describe the solution you'd like
A flag to disable the refreshView call. Perhaps like this:

{
            undoable: true,
            disableRefresh: true
            .....
}

Describe alternatives you've considered
I have a workaround by making my own dispatch call, but it currently has no error handling and I'd prefer to directly call useMutation.

Additional context
Looking for guidance on whether or not this makes sense and potential direction on how to implement. I can possibly offer a PR. Somewhat related, I'd also like to optimistically render and issue the server update simultaneously with no undo or notification. Notify would only occur on an error.

@fzaninotto
Copy link
Member

This is somehow fixed by #4386. We don't do a full refresh anymore - just replaying the requests that were delayed while in optimistic mode. Besides, you can disable refetching using the new Application Cache feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants