fix up scroll behaviour when loading widgets

This commit is contained in:
Matthew Hodgson 2016-04-02 00:36:19 +01:00
parent 62d04c38ef
commit 4388334e30
8 changed files with 55 additions and 44 deletions

View file

@ -798,9 +798,9 @@ module.exports = React.createClass({
}
}
// once images in the search results load, make the scrollPanel check
// once dynamic content in the search results load, make the scrollPanel check
// the scroll offsets.
var onImageLoad = () => {
var onWidgetLoad = () => {
var scrollPanel = this.refs.searchResultsPanel;
if (scrollPanel) {
scrollPanel.checkScroll();
@ -844,7 +844,7 @@ module.exports = React.createClass({
searchResult={result}
searchHighlights={this.state.searchHighlights}
resultLink={resultLink}
onImageLoad={onImageLoad}/>);
onWidgetLoad={onWidgetLoad}/>);
}
return ret;
},