From 429a4ca382ede79e6c0362b8f643f90e71fb2eb1 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 9 Oct 2015 10:55:52 +0800 Subject: [PATCH 1/2] refactor: `joinClasses` is removed in React@0.14.x --- components/affix/index.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/affix/index.jsx b/components/affix/index.jsx index e290fc8e84..ec28e0549c 100644 --- a/components/affix/index.jsx +++ b/components/affix/index.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import joinClasses from 'react/lib/joinClasses'; import rcUtil from 'rc-util'; function getScroll(w, top) { @@ -89,12 +88,14 @@ let Affix = React.createClass({ }, render() { - let affix = this.state.affix ? 'ant-affix' : ''; - let className = this.props.className; + const className = rcUtil.classSet({ + [`${this.props.className}`]: this.props.className, + ['ant-affix']: this.state.affix + }); return (
-
+
{this.props.children}
From 26069c33e925d0a06e562963c0f2f57977e32e96 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 9 Oct 2015 10:56:59 +0800 Subject: [PATCH 2/2] chore: upgrade react-slick in order to work with React@0.14.x --- components/affix/index.jsx | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/affix/index.jsx b/components/affix/index.jsx index ec28e0549c..770017ff23 100644 --- a/components/affix/index.jsx +++ b/components/affix/index.jsx @@ -89,8 +89,8 @@ let Affix = React.createClass({ render() { const className = rcUtil.classSet({ - [`${this.props.className}`]: this.props.className, - ['ant-affix']: this.state.affix + [this.props.className]: this.props.className, + 'ant-affix': this.state.affix }); return ( diff --git a/package.json b/package.json index 428605a8ae..a0be3bbd40 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "rc-tree": "~0.15.4", "rc-upload": "~1.6.4", "rc-util": "~2.0.3", - "react-slick": "~0.7.0", + "react-slick": "~0.8.0", "reqwest-without-xhr2": "~2.0.2", "util-deprecate": "~1.0.1", "velocity-animate": "~1.2.2"