Skip to content
Snippets Groups Projects
Commit e89cdc65 authored by Kyle Doherty's avatar Kyle Doherty
Browse files

Merge pull request #225 from metabase/handle_empty_group_by

only show group by if there are options
parents 3ba6d2cf a70a2723
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ var QueryPicker = React.createClass({
addDimensionButton,
addDimensionButtonText;
if(this.props.aggregationComplete()) {
if(this.props.aggregationComplete() && this.props.options.breakout_options.fields.length > 0) {
(this.props.query.breakout.length < 1) ? addDimensionButtonText = "Grouped by" : addDimensionButtonText = "and";
......@@ -147,7 +147,8 @@ var QueryPicker = React.createClass({
</div>
);
}
var dbSelector
var dbSelector;
if(this.props.dbList && this.props.dbList.length > 1) {
dbSelector = (
<DatabaseSelector
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment