Is it possible to refresh the editor view after action execution?
Is it possible to refresh the editor view after an EntityMenu action is successfully executed? Read-only and visibility settings for some fields are based on the entity's Status. I've added a 'Close' action which sets the Status to Closed and does some additional processing (link sending an email etc.). After the action has been completed some fields should be set to read-only or hidden. But the editor view is not being refreshed after the action has been executed. Only when I navigate to the list view and then back to the editor view the read-only and visibility settings kick in.
We could look at implementing this, but the thing I wouldn't be pleased about is if we did re-fresh the view, it would effectively loose any unsaved changes which I don't think people would expect 🤔
Good point. Would it be possible to add something like an optional RefreshEditorView field to the KonstruktActionResult which defaults to false? This optional setting would only have an effect on KonstruktActionType.EntityMenu and KonstruktActionType.Save actions. That way a developer can at least trigger the refresh when necessary, but maybe the docs could mention that it should probably only be used for KonstruktActionType.Save actions to prevent loss of unsaved changes?
Yea, I don't particularly like adding fields only used in one approach to the results model, but we could maybe do something like add a RefreshActionResult type that can be returned and that triggers a view refresh.
I'll have to take a look at what would be required to support this.
Is it possible to refresh the editor view after action execution?
Is it possible to refresh the editor view after an
EntityMenuaction is successfully executed? Read-only and visibility settings for some fields are based on the entity's Status. I've added a 'Close' action which sets the Status to Closed and does some additional processing (link sending an email etc.). After the action has been completed some fields should be set to read-only or hidden. But the editor view is not being refreshed after the action has been executed. Only when I navigate to the list view and then back to the editor view the read-only and visibility settings kick in.I can of course make it a
Rowaction instead. But it's a bit more intuitive for the users to have it has anEntityMenuaction.Hmmm, unfortunately currently it's not.
We could look at implementing this, but the thing I wouldn't be pleased about is if we did re-fresh the view, it would effectively loose any unsaved changes which I don't think people would expect 🤔
Good point. Would it be possible to add something like an optional
RefreshEditorViewfield to theKonstruktActionResultwhich defaults tofalse? This optional setting would only have an effect onKonstruktActionType.EntityMenuandKonstruktActionType.Saveactions. That way a developer can at least trigger the refresh when necessary, but maybe the docs could mention that it should probably only be used forKonstruktActionType.Saveactions to prevent loss of unsaved changes?Yea, I don't particularly like adding fields only used in one approach to the results model, but we could maybe do something like add a
RefreshActionResulttype that can be returned and that triggers a view refresh.I'll have to take a look at what would be required to support this.
That would be awesome! 👌🏻
Do you need me to add a feature request to https://github.com/outfielddigital/konstrukt/discussions?
Ooh, yes please 👍🏻
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.