File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export function withAuto(render: any) {
93
93
if ( isDev ) {
94
94
withAuto . dev = ( render : any ) => {
95
95
const Component = render . length > 1 ? React . forwardRef ( render ) : render
96
- function AutoRender ( props : any ) {
96
+ const AutoRender = React . forwardRef ( ( props : any , ref : any ) => {
97
97
const { auto, depth, commit } = useAutoRender ( Component )
98
98
function useCommit ( observer : AutoObserver ) {
99
99
let nonce = 0
@@ -111,10 +111,10 @@ if (isDev) {
111
111
}
112
112
return (
113
113
< AutoDepth value = { depth + 1 } >
114
- < Component { ...props } $auto = { auto } $useCommit = { useCommit } />
114
+ < Component { ...props } ref = { ref } $auto = { auto } $useCommit = { useCommit } />
115
115
</ AutoDepth >
116
116
)
117
- }
117
+ } )
118
118
Object . defineProperty ( AutoRender , 'displayName' , {
119
119
get : ( ) => 'AutoRender' ,
120
120
set ( displayName ) {
You can’t perform that action at this time.
0 commit comments