Rerender widget from modal

(Leo McArdle) #1

I’ve run into a bit of a problem I can’t work out while trying to implement an “Improve this translation” modal in the discourse-translator plugin.

After I (successfully) submit the improved translation to the server, I want to update the displayed translation which requires me to rerender the widget displaying the translation, but nothing I’ve tried works.

This is where I want to trigger the widget rerendering:

And this is the widget I want to rerender:

I know I’m properly updating the model with the improved translation, because when I interact with the widget (which causes a rerender) the improved translation appears in the widget in place of the old one.

It’s just how do I trigger that rerender from outside of the widget? :confused: