mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
Bumping the JS libs to fix the build (#2616)
* bumping the js libs * New linting rules * More linting * More * Done linting * npm >=4.5.0 * Bumping node * Tweaking the build * Fixing the damn build * Fixing the apps
This commit is contained in:
committed by
GitHub
parent
a2b30f35fc
commit
366ecefbaa
@@ -1,7 +1,8 @@
|
||||
const $ = window.$ = require('jquery');
|
||||
import React from 'react';
|
||||
import Select from 'react-select';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
const propTypes = {
|
||||
dataEndpoint: React.PropTypes.string.isRequired,
|
||||
onChange: React.PropTypes.func.isRequired,
|
||||
@@ -13,7 +14,7 @@ const propTypes = {
|
||||
|
||||
const defaultProps = {
|
||||
placeholder: 'Select ...',
|
||||
valueRenderer: (o) => (<div>{o.label}</div>),
|
||||
valueRenderer: o => (<div>{o.label}</div>),
|
||||
};
|
||||
|
||||
class AsyncSelect extends React.PureComponent {
|
||||
@@ -27,6 +28,9 @@ class AsyncSelect extends React.PureComponent {
|
||||
componentDidMount() {
|
||||
this.fetchOptions();
|
||||
}
|
||||
onChange(opt) {
|
||||
this.props.onChange(opt);
|
||||
}
|
||||
fetchOptions() {
|
||||
this.setState({ isLoading: true });
|
||||
const mutator = this.props.mutator;
|
||||
@@ -34,9 +38,6 @@ class AsyncSelect extends React.PureComponent {
|
||||
this.setState({ options: mutator ? mutator(data) : data, isLoading: false });
|
||||
});
|
||||
}
|
||||
onChange(opt) {
|
||||
this.props.onChange(opt);
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user