Return alert instead of fetch button when async results has no data (#2072)

This commit is contained in:
vera-liu 2017-01-30 11:03:37 -08:00 committed by GitHub
parent 87869a29c9
commit 2d419e4253
1 changed files with 4 additions and 0 deletions

View File

@ -198,6 +198,10 @@ class ResultSet extends React.PureComponent {
</div>
);
} else if (query.resultsKey) {
if (results && data && data.length === 0) {
// if fetched result contains zero rows of data
return <Alert bsStyle="warning">The asynchronous query returned no data</Alert>;
}
return (
<div>
<Alert bsStyle="warning">This query was run asynchronously &nbsp;