-
Notifications
You must be signed in to change notification settings - Fork 49
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
Failed to ref to Allotment.Pane #582
Comments
@johnwalley Having the same issue here, const MyParentComponent = () => {
const paneRef = useRef<HTMLDivElement>(null) // not working
const myComponentRef = useRef(null) // obv works
const allotmentRef = React.useRef<AllotmentHandle>(null) // works
return (
<Allotment
onChange={(size) => { /* some handler */}}
ref={allotmentRef} // this one works
>
<Allotment.Pane ref={paneRef}> /* always undefined */
<MyComponent ref={myComponentRef} /> /* this is my workaround */
</Allotment.Pane>
)
} Experienced the issue on |
I just had a quick look at this. I'm having some success with a change like this: #632. But I'll need to determine in more depth if it's correct (and work out what the correct types are). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it by design or is it a bug?
The text was updated successfully, but these errors were encountered: