Skip to content

Commit

Permalink
Touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jul 25, 2017
1 parent 7a5115a commit 0c2cac2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default class SelectControl extends React.PureComponent {
this.onChange = this.onChange.bind(this);
}
componentWillReceiveProps(nextProps) {
if (nextProps.choices !== this.props.choices) {
if (nextProps.choices !== this.props.choices ||
nextProps.options !== this.props.options) {
const options = this.getOptions(nextProps);
this.setState({ options });
}
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/javascripts/explore/stores/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export const controls = {
valueRenderer: c => <ColumnOption column={c} />,
valueKey: 'column_name',
mapStateToProps: state => ({
options: (state.datasource) ? state.datasource.columns : [],
options: (state.datasource) ? state.datasource.columns.filter(c => c.groupby) : [],
}),
},

Expand Down
2 changes: 1 addition & 1 deletion superset/connectors/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def expression(self):
def data(self):
attrs = (
'column_name', 'verbose_name', 'description', 'expression',
'filterable')
'filterable', 'groupby')
return {s: getattr(self, s) for s in attrs}


Expand Down

0 comments on commit 0c2cac2

Please sign in to comment.