mirror of
https://github.com/apache/superset.git
synced 2026-04-14 05:34:38 +00:00
[explore] force control validation before runQuery (#2544)
* [explore] force control validation before runQuery * Addressing comments
This commit is contained in:
committed by
GitHub
parent
493ba18362
commit
75a358c616
@@ -48,8 +48,12 @@ export default class Control extends React.PureComponent {
|
||||
super(props);
|
||||
this.validate = this.validate.bind(this);
|
||||
this.onChange = this.onChange.bind(this);
|
||||
this.validateAndSetValue(props.value, []);
|
||||
}
|
||||
onChange(value, errors) {
|
||||
this.validateAndSetValue(value, errors);
|
||||
}
|
||||
validateAndSetValue(value, errors) {
|
||||
let validationErrors = this.validate(value);
|
||||
if (errors && errors.length > 0) {
|
||||
validationErrors = validationErrors.concat(errors);
|
||||
|
||||
Reference in New Issue
Block a user