# Rerender widget from modal

**URL:** https://meta.discourse.org/t/rerender-widget-from-modal/53723
**Category:** Development
**Created:** [2016年十二月2日 22:04 UTC](https://meta.discourse.org/t/rerender-widget-from-modal/53723 "2016-12-02T22:04:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [2016年十二月2日 22:04 UTC](https://meta.discourse.org/t/rerender-widget-from-modal/53723/1 "2016-12-02T22:04:01Z")

</div>

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:

> <https://github.com/LeoMcA/discourse-translator/blob/improve-translation/assets/javascripts/discourse/controllers/translator-improve.js.es6#L15>

And this is the widget I want to rerender:

> <https://github.com/LeoMcA/discourse-translator/blob/improve-translation/assets/javascripts/discourse/initializers/extend-for-translate-button.js.es6#L90>

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? 😕
