Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: _react2.default.unmountComponentAtNode is not a function #43

Closed
ferpintado opened this issue Feb 14, 2017 · 4 comments

Comments

@ferpintado
Copy link

I have added a Tooltip to one of the children components (https://github.com/romainberger/react-portal-tooltip) and after the tooltip is displayed and I tried to collapse or open one of the parent nodes I get this:

Uncaught TypeError: _react2.default.unmountComponentAtNode is not a function

You can see exactly what happens here:
http://www.giphy.com/gifs/l3q2BwUPU2tjvMY36

@tiansijie
Copy link
Contributor

Without seeing the code it's hard to know what causing the problem

@ferpintado
Copy link
Author

Here u go.

This is my children component

import React from 'react';
import FontIcon from 'react-md/lib/FontIcons';
import ToolTip from 'react-portal-tooltip';

export default class ListService extends React.Component {

state = {
isTooltipActive: false,
toolTipParent: ""
}

componentWillMount() {
this.setState({
toolTipParent: "#" + this.getTooltipID()
})
}

getTooltipID = () => {
var id = "toolTip_" + this.props.data.id;
return id;
}

render() {

let style = {
  style: {
    margin: "auto",
    width: "90%",
    maxWidth: "220px",
    left: 0,
    right:0
  },
  arrowStyle: {
    color: '#ffffff'
  }
}

return (
  <div>
    <ToolTip active={this.state.isTooltipActive} position="top" arrow="right" parent={this.state.toolTipParent} style={style}>
        <div>
            <p>This is the content of the tooltip {this.getTooltipID()}</p>
            <img src="image.png"/>
        </div>
    </ToolTip>
    <div className="ServiceMenuService" onClick={this.props.onClick} >

        <span className="ServiceTitle">{this.props.name}</span>
        <FontIcon 
          id={this.getTooltipID()} 
          onClick={()=>this.setState({isTooltipActive: !this.state.isTooltipActive})}
        >info_outline</FontIcon>        
    </div>
  </div>

);

}
}

@danieldram
Copy link

Hi did you ever find a resolution for this? I am having a similar issue.

@tiansijie
Copy link
Contributor

tiansijie commented Jun 14, 2017

@danieldram @ferpintado i don't see any errors when use react 15^. I want to know what version of react you are using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants