Editable Text Elements with state changes

When I create a widget with an editable text element, I can change the text in the prototype.
However, if this widget changes its state, the text element is reset to its original content (as shown in screenshots).

35
-widget in “view”-mode

30
-Widget in “edit”-mode

Is there a way to set the edited text as the new content?

Thanks!