Hide 'no results found' once there's at least one result

Naturally, the 'no results found' should only appear as long as there
are actually no results found.

Bug: 52463
Change-Id: I0116b769b9e4995678975d43a74c54c4d426f672
This commit is contained in:
Moriel Schottlender 2014-05-16 18:35:41 -04:00
parent 52d562a92a
commit 3a9faa44fc

View file

@ -181,6 +181,12 @@ ve.ui.MWMediaSearchWidget.prototype.onMediaQueryAlways = function ( source ) {
this.$noItemsMessage.show();
}
}
// Even if the whole list of sources didn't finish yet
// if there are results, make the message go away
if ( this.results.getItems().length > 0 ) {
this.$noItemsMessage.hide();
}
};
/**