From 1cc3981453d90f5d7a909f4c711d4d1e9d707eaa Mon Sep 17 00:00:00 2001 From: Mathieu Merzereau Date: Wed, 20 Jul 2016 13:56:36 +0200 Subject: [PATCH] Fix warnings from deprecated imports in rc-util --- src/Select.jsx | 2 +- src/SelectTrigger.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Select.jsx b/src/Select.jsx index 5946faee..da75760d 100644 --- a/src/Select.jsx +++ b/src/Select.jsx @@ -1,6 +1,6 @@ import React, {PropTypes} from 'react'; import ReactDOM from 'react-dom'; -import { KeyCode } from 'rc-util'; +import KeyCode from 'rc-util/lib/KeyCode'; import classnames from 'classnames'; import assign from 'object-assign'; import Animate from 'rc-animate'; diff --git a/src/SelectTrigger.jsx b/src/SelectTrigger.jsx index c914c436..042e0a1e 100644 --- a/src/SelectTrigger.jsx +++ b/src/SelectTrigger.jsx @@ -4,7 +4,7 @@ import classnames from 'classnames'; import Trigger from 'rc-trigger'; import Tree, { TreeNode } from 'rc-tree'; import { loopAllChildren, flatToHierarchy, getValuePropValue, labelCompatible } from './util'; -import rcUtil from 'rc-util'; +import toArray from 'rc-util/lib/Children/toArray'; const BUILT_IN_PLACEMENTS = { bottomLeft: { @@ -231,7 +231,7 @@ const SelectTrigger = React.createClass({ const recursive = children => { // 注意: 如果用 React.Children.map 遍历,key 会被修改掉。 - return rcUtil.Children.toArray(children).map(child => { + return toArray(children).map(child => { if (child && child.props.children) { // null or String has no Prop return {recursive(child.props.children)};