Skip to content

Commit d8ad64d

Browse files
committed
fix react-unknown-prop warnings
1 parent b34231d commit d8ad64d

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-queue-anim",
3-
"version": "0.11.11",
3+
"version": "0.11.12",
44
"description": "Queue animation component for react",
55
"keywords": [
66
"react",
@@ -45,9 +45,9 @@
4545
"precommit-hook": "1.x",
4646
"rc-dialog": "~5.2.1",
4747
"rc-tools": "5.x",
48-
"react": "~0.14.0",
49-
"react-addons-test-utils": "~0.14.0",
50-
"react-dom": "~0.14.0",
48+
"react": "~15.2.0",
49+
"react-addons-test-utils": "~15.2.0",
50+
"react-dom": "~15.2.0",
5151
"react-router": "~1.0.0-rc1"
5252
},
5353
"precommit": [

src/QueueAnim.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,19 @@ class QueueAnim extends React.Component {
358358
key: placeholderKeyPrefix + child.key,
359359
});
360360
});
361-
return createElement(this.props.component, this.props, childrenToRender);
361+
const { ...tagProps } = this.props;
362+
[
363+
'component',
364+
'interval',
365+
'duration',
366+
'delay',
367+
'type',
368+
'animConfig',
369+
'ease',
370+
'leaveReverse',
371+
'animatingClassName',
372+
].forEach(key => delete tagProps[key]);
373+
return createElement(this.props.component, { ...tagProps }, childrenToRender);
362374
}
363375
}
364376

0 commit comments

Comments
 (0)