Skip to content

Commit 3ba4d7a

Browse files
authoredSep 12, 2018
Merge pull request #425 from MtBlue81/fix_state_initialization
fix(index.js): fix state initialization
2 parents be89b82 + 69dea07 commit 3ba4d7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class ReactTooltip extends React.Component {
7474
constructor (props) {
7575
super(props)
7676
this.state = {
77-
place: 'top', // Direction of tooltip
77+
place: props.place || 'top', // Direction of tooltip
78+
desiredPlace: props.place || 'top',
7879
type: 'dark', // Color theme of tooltip
7980
effect: 'float', // float or fixed
8081
show: false,

0 commit comments

Comments
 (0)
Please sign in to comment.