File tree Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -498,26 +498,6 @@ class YourComponent extends Component {
498498
499499If set to ` true ` , will allow dragging on non left-button clicks.
500500
501- #### ` nodeRef?: React.Ref<typeof React.Component> `
502-
503- please see, https://github.com/STRML/react-draggable
504- ```
505- If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
506- Unfortunately, in order for <Draggable> to work properly, we need raw access
507- to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
508- as in this example:
509-
510- function MyComponent() {
511- const nodeRef = React.useRef(null);
512- return (
513- <Rnd nodeRef={nodeRef}>
514- <div ref={nodeRef}>Example Target</div>
515- </Rnd>
516- );
517- }
518-
519- ```
520-
521501## Test
522502
523503``` sh
Original file line number Diff line number Diff line change @@ -626,7 +626,7 @@ export class Rnd extends React.PureComponent<Props, State> {
626626 cancel = { cancel }
627627 scale = { scale }
628628 allowAnyClick = { allowAnyClick }
629- nodeRef = { nodeRef }
629+ nodeRef = { { current : this . getSelfElement ( ) } }
630630 >
631631 < Resizable
632632 { ...resizableProps }
You can’t perform that action at this time.
0 commit comments