I’ve found a better workaround than the one I presented here. This one avoids the tedious task of setting unique IDs on the inputs since it uses the thisInstance variable which can be accessed automatically inside the workflow.
This workaround still relies on a Custom JavaScript action at the end of the workflow. It will only update the current input which the workflow is tied to (so if you’re updating any other inputs, it will probably not work without modification).
The code is as follows:
// Guards against loops related to dispatching events inside an event handler
if(event.domEvent instanceof InputEvent) {
// Figure out the uid of the variable associated with the input
const thisInputVariableKey = context.thisInstance.getAttribute('data-ww-uid') + '-value';
// Apply the variable value to the input value
context.thisInstance.value = variables[thisInputVariableKey]
// Dispatch the event so Vue.js will re-render the input properly
context.thisInstance.dispatchEvent(new Event('input', { bubbles: true }));
}
It gets the UID of the input field, retrieves the value from the variable and sets it into the input. Then, it triggers an Input event that Vue.js will be able to catch and will use to re-render the input. It’s working both for setting and resetting values from input.
@DanielL It’s been 20+ days now, we need an ETA on this silly bug.