[explorev2] adding support for client side validators on controls (#1920)

* Adding support for client side validators on controls

* Applying validators to more fields

* Addressing comments
This commit is contained in:
Maxime Beauchemin
2017-01-12 09:21:17 -08:00
committed by GitHub
parent fc74fbeeaa
commit 470a6e9d76
20 changed files with 237 additions and 105 deletions

View File

@@ -33,11 +33,7 @@ export default class SelectField extends React.Component {
if (this.props.multi) {
optionValue = opt ? opt.map((o) => o.value) : null;
}
if (this.props.name === 'datasource' && optionValue !== null) {
this.props.onChange(this.props.name, optionValue, opt.label);
} else {
this.props.onChange(this.props.name, optionValue);
}
this.props.onChange(optionValue);
}
renderOption(opt) {
if (this.props.name === 'viz_type') {