graceguo-supercat commented on a change in pull request #9829:
URL:
https://github.com/apache/incubator-superset/pull/9829#discussion_r426931499
##########
File path:
superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx
##########
@@ -60,7 +63,35 @@ export default class FilterBoxItemControl extends
React.Component {
this.props.onChange(this.state);
}
onControlChange(attr, value) {
- this.setState({ [attr]: value }, this.onChange);
+ let typedValue = value;
+ const { column: selectedColumnName, multiple } = this.state;
+ if (value && !multiple && attr === 'defaultValue') {
Review comment:
added 2 constants, `defaultValue` and `multi` (used by this feature).
but there are quite a few other attributes used in many places...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]