-
-
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
Fix DeleteButton undoable={false} in List does not refresh List #2662
Conversation
Can you describe the bug you’re trying to fix ? |
Sorry, I put it in the commit message. #2425 |
the same change need to be done in crudUpdate as well. |
i think the complete fix for this issue should:
The refresh of ui shouldn't be triggered by undo effect, it should be triggered by the event of "data updated". |
Thanks for writing a patch for that issue @BartoGabriel 🎉 I can confirm that it solves the problem outlined in #2425. @normanzb Sounds plausible. But with the When using the delete button on the list, the exact same route is pushed to the router which ignores the request, because we're already on that page and hence doesn't trigger a reload. As to your fear of triggering refresh twice: I couldn't reproduce that. With or without undo, it seems to refresh just once. Until this is merged, I found that you can solve the problem with a dirty trick (that introduces another drawback – you decide which weighs more on your users): Create a custom copy of the @fzaninotto Is there anything aside from your review that's preventing this PR from being merged? |
It displays the |
Exactly :-) That's why it's a drawback – it suggests you can undo the action, but you can't. I wasn't clear on that, thanks for pointing it out. |
That does happens to me on edit view. I have a custom made edit view, for my edit view, I prefer to stay on edit view once the editing is finished. if I enable undoable for that edit view, even after the update is sent and responsed, the interface stay unchanged. Anyway I think it would be nice to keep the code consistent:
|
This will add a useless rerender even on optimistic actions, but it's the proper way to fix the bug. |
Thanks! |
After making an delete, by default you must refresh.
Closes #2425