Skip to content

Commit

Permalink
Reset Models/ Components when resetting layout (#2576) (#2578)
Browse files Browse the repository at this point in the history
* Reset Models/ Components when resetting layout (#2576)

* simplify refresh code

* dispatch resize event instead of reloading

Co-authored-by: Marc Skov Madsen <masma@orsted.dk>
  • Loading branch information
MarcSkovMadsen and Marc Skov Madsen authored Aug 2, 2021
1 parent 8017dff commit fb9eff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions panel/template/fast/grid/fast_grid_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@
this.setState({
layouts: {{ layouts }}
});
window.dispatchEvent(new Event("resize"));
}
onLayoutChange(layout, layouts)
{
Expand Down
1 change: 1 addition & 0 deletions panel/template/react/react.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
this.setState({
layouts: {{ layouts }}
});
window.dispatchEvent(new Event("resize"))
}

onLayoutChange(layout, layouts)
Expand Down

0 comments on commit fb9eff9

Please sign in to comment.