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

Using Callback Refs for parent property #83

Open
khawerrind opened this issue Dec 27, 2018 · 0 comments
Open

Using Callback Refs for parent property #83

khawerrind opened this issue Dec 27, 2018 · 0 comments

Comments

@khawerrind
Copy link

I am not able to set parent element using React Callback Refs

setReactionsRef = (element) => {
    this.element = element;
}

<div
    onMouseEnter={this.showReactions}
    onMouseLeave={this.hideReactions}
    ref={this.setReactionsRef}
>
    {'Hello World'}
</div>
<ToolTip
    active={this.state.showReactions}
    position='top'
    parent={this.element}
    tooltipTimeout={500}
>
    {'Hello World'}
</ToolTip>

The error that i am getting is as follows

Failed prop type: The prop `parent` is marked as required in `ToolTip`, but its value is `undefined`.
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

1 participant