-
Notifications
You must be signed in to change notification settings - Fork 106
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
Card is not updated after edit action #1848
Comments
Regarding your comment on dedup CardDeck vs. Crud - I appreciate to see CardDeck just as another way of displaying a Crud, and having everything else the same. I made a quick overview of analogies, and also of parts that are missing in CardDeck implementation that are present though in Crud, not exhaustive, but a good starting point how a CardDeck derived from Crud could benefit from existing code. |
@mvorisek Can we do a quick fix on this, as otherwise the CardDeck is in a way useless if it does not immediately reflect edits and deletes upon execution. The refactoring as a variant of Crud will take more time certainly to implement. Alternatively, @ibelar could you have a look how to make sure all APPLIES_TO_SINGLE_RECORD userAction updates are triggering a reload of the CardDeck after submit? And same with deletes? |
For Single record actions, around this line Line 159 in 6d98faf
also the initActionExecutor's logic has to be added to the Executor to reload if action was successful |
@ibelar After some further look at the history commits, looks like this is broken since executor refactor by you done last year - any chance you can fix this easily? CardDeck is powerful and we should get it back running |
@mkrecek234 I don't think Card reload or delete was ever implement, yet, in CardDeck. It was mainly for UserAction that does not modify model record. |
@ibelar I did not dig deeply in it, but check this code out. Isn't this the reload feature (which actually works OK for added cards, but is not initialized for SINGLE_RECORD updates/deletes? Line 202 in 6d98faf
I'd think we have to somehow also make sure the we add a hook also after UserAction success/completed. Unfortunately, not experienced with the whole Executor logic as you are ;-) We have to make sure that $this->addClickAction also registers a hook after a completed UserAction to reload the CardDeck. |
tested on demos in RW mode (commented out transaction throw/break and no
initPreventModification
):in RO mode (default):
Dedup the reload code with Crud. Crud currently works as expected.
The text was updated successfully, but these errors were encountered: