mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Fixing PropTypes warning messages (#2670)
* Fixing PropTypes warning message React recently started warning on the upcoming deprecation of React.PropTypes, the new approach is to use the `prop-types` npm package instead. * Fixing the tests
This commit is contained in:
committed by
GitHub
parent
29780821e8
commit
e055e6d2c2
@@ -1,15 +1,16 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Select from 'react-select';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
const propTypes = {
|
||||
dataEndpoint: React.PropTypes.string.isRequired,
|
||||
onChange: React.PropTypes.func.isRequired,
|
||||
mutator: React.PropTypes.func.isRequired,
|
||||
value: React.PropTypes.number,
|
||||
valueRenderer: React.PropTypes.func,
|
||||
placeholder: React.PropTypes.string,
|
||||
dataEndpoint: PropTypes.string.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
mutator: PropTypes.func.isRequired,
|
||||
value: PropTypes.number,
|
||||
valueRenderer: PropTypes.func,
|
||||
placeholder: PropTypes.string,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button as BootstrapButton, Tooltip, OverlayTrigger } from 'react-bootstrap';
|
||||
import { slugify } from '../modules/utils';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Label } from 'react-bootstrap';
|
||||
import moment from 'moment';
|
||||
import TooltipWrapper from './TooltipWrapper';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Tooltip, OverlayTrigger, MenuItem } from 'react-bootstrap';
|
||||
|
||||
const propTypes = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import cx from 'classnames';
|
||||
import TooltipWrapper from './TooltipWrapper';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { List } from 'immutable';
|
||||
import React, { PropTypes, PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { PureComponent } from 'react';
|
||||
import {
|
||||
Column,
|
||||
Table,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Tooltip, OverlayTrigger } from 'react-bootstrap';
|
||||
import { slugify } from '../modules/utils';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Modal } from 'react-bootstrap';
|
||||
import cx from 'classnames';
|
||||
import Button from './Button';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { now, fDuration } from '../modules/dates';
|
||||
|
||||
class Timer extends React.PureComponent {
|
||||
@@ -54,11 +55,11 @@ class Timer extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
Timer.propTypes = {
|
||||
startTime: React.PropTypes.number,
|
||||
endTime: React.PropTypes.number,
|
||||
isRunning: React.PropTypes.bool.isRequired,
|
||||
status: React.PropTypes.string,
|
||||
style: React.PropTypes.object,
|
||||
startTime: PropTypes.number,
|
||||
endTime: PropTypes.number,
|
||||
isRunning: PropTypes.bool.isRequired,
|
||||
status: PropTypes.string,
|
||||
style: PropTypes.object,
|
||||
};
|
||||
|
||||
Timer.defaultProps = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Tooltip, OverlayTrigger } from 'react-bootstrap';
|
||||
import { slugify } from '../modules/utils';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user