awkward / backbone.modal

A plugin for Backbone.js that simplifies creating modals for your application.
http://awkward.github.io/backbone.modal/
Other
362 stars 71 forks source link

Refresh (re-render) step view #56

Closed sospedra closed 9 years ago

sospedra commented 9 years ago

I'm looking for that and I don't find it, it is implemented in anyway? It'd be an awesome feature!

davidvanleeuwen commented 9 years ago

You can call .render() with the options for the second step, e.g.: modalView.render({name: 'tab2'}) like in the example. Hope that helps.

jeff-h commented 8 years ago

For anyone finding this issue, I found that the above method causes the entire modal to redraw with its fade-in animation.

Assuming you created the modal with one or more backbone views via the Modal views object/array, I discovered you can access the view shown inside the modal and re-render it as follows:

modalView.currentView.render()

This re-renders the modal's content, without redrawing the entire modal, thus no animation or flashing.