Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Arjan H. 226 posts 463 karma points c-trib
    Jan 23, 2023 @ 20:07
    Arjan H.
    0

    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.

  • Arjan H. 226 posts 463 karma points c-trib
    Jan 23, 2023 @ 20:25
    Arjan H.
    0

    I can of course make it a Row action instead. But it's a bit more intuitive for the users to have it has an EntityMenu action.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 24, 2023 @ 09:30
    Matt Brailsford
    0

    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 🤔

  • Arjan H. 226 posts 463 karma points c-trib
    Jan 24, 2023 @ 09:46
    Arjan H.
    0

    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?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 24, 2023 @ 10:54
    Matt Brailsford
    1

    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.

  • Arjan H. 226 posts 463 karma points c-trib
    Jan 24, 2023 @ 11:28
    Arjan H.
    0

    That would be awesome! 👌🏻

  • Arjan H. 226 posts 463 karma points c-trib
    Jan 24, 2023 @ 14:44
    Arjan H.
    0

    Do you need me to add a feature request to https://github.com/outfielddigital/konstrukt/discussions?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 24, 2023 @ 15:27
    Matt Brailsford
    0

    Ooh, yes please 👍🏻

Please Sign in or register to post replies

Write your reply to:

Draft