fix: <DraggableCore> not mounted on DragStart#671
fix: <DraggableCore> not mounted on DragStart#671gitducheng wants to merge 1 commit intoreact-grid-layout:masterfrom
Conversation
|
Can we get this merged and released? |
|
Considering the simplicity of this fix, how come it's not merged yet? |
|
I worked around this problem (in my React class, not function) by changing code that looked like this: to this: I just changed the |
|
Closing this PR as stale. While this DraggableCore mounting fix received community interest, the PR has been open since 2022 without being merged. The codebase has been updated to support React 19 and uses the nodeRef pattern. If this issue persists, please open a fresh PR against the current codebase. Thank you for the contribution! |
|
Retrospective note: This PR contains a legitimate one-line bug fix. The change from The fix is simple and correct. If anyone wants to re-implement this against the current React 19-compatible codebase, this is the core change needed: // Before (buggy):
return this.props?.nodeRef ? this.props?.nodeRef?.current : ReactDOM.findDOMNode(this);
// After (fixed):
return this.props?.nodeRef?.current ? this.props?.nodeRef?.current : ReactDOM.findDOMNode(this); |
|
Reopening - this is a legitimate bug fix worth implementing. |
|
Closing - Handled Differently in React 19 Update The codebase has been updated for React 19 compatibility. The
The specific bug this PR addressed (returning null during initial mount) is now handled by requiring Thank you for identifying this issue - it helped inform the React 19 migration! |
fix: not mounted on DragStart.