-
Notifications
You must be signed in to change notification settings - Fork 279
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
draggable prop issue #475
Comments
Same issue |
Experiencing a similar issue, the exact same with https://stackoverflow.com/questions/77272006/react-d3-tree-zoom-and-drag-not-working-on-next-js-13 everything's fine locally, but dragging and zooming does not work on the client side. |
I had this issue with next 14.0.3, react-d3-tree 3.6.1 with dragging working intermittently (maybe 1 in 10 refreshes it work) and zooming not working at all. I came across https://stackoverflow.com/questions/62944931/nextjs-issue-with-server-side-rendering-with-react-d3-tree which seems tangentially related and seems to me to suggest that Next is being overly eager with SSR and that is messing with the client side interactions. The solution: https://stackoverflow.com/a/65697349 looks to have worked for me TLDR: import X from "@/Blah/Blah/components/B"; With const X = dynamic(
() => import("@/Blah/Blah/components/B"),
{ ssr: false }
); |
I experienced this issue with Remix and Vite. When directly loading a page containing the Tree component, the following is logged in the browser console:
and the component is not interactive. However, when navigating to the same page through a Link, this does not happen, probably because the component has already been preloaded by Remix. The problem therefore seems to be related to hydration. For now, I have solved it by wrapping the Tree component in the ClientOnly component from Remix utils. |
Thank you for taking the time to report an issue with react-d3-tree!
Feel free to delete any questions that do not apply.
Are you reporting a bug, or opening a feature request?
I'm reporting a bug
What is the actual behavior/output?
I'm facing an issue with the "draggable" prop sometimes it work perfectly and sometimes it doesn't even work even though it is true. Like whenever I'm starting the server it work after 2 or 3 reloads and if I reload the page it does not work.
<div className="h-full w-full flex items-center justify-center bg-purple-300"> <div className="flex items-center justify-center border h-[800px] w-[1000px] overflow-auto" > <Tree data={orgChart} draggable={true} orientation="vertical" pathFunc="step" zoomable={false} collapsible={false} /> </div> </div>
The text was updated successfully, but these errors were encountered: