File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,10 @@ findDOMNode._injectFiber(function(fiber: Fiber) {
5757type DOMContainerElement = Element & { _reactRootContainer : ?Object } ;
5858
5959type Container = Element ;
60- type Props = { children ?: mixed } ;
60+ type Props = {
61+ autoFocus ?: boolean ,
62+ children ?: mixed ,
63+ } ;
6164type Instance = Element ;
6265type TextInstance = Text ;
6366
@@ -105,7 +108,7 @@ function shouldAutoFocusHostComponent(
105108 case 'input' :
106109 case 'select' :
107110 case 'textarea' :
108- return ! ! ( props : any ) . autoFocus ;
111+ return ! ! props . autoFocus ;
109112 }
110113 return false ;
111114}
@@ -224,7 +227,7 @@ var DOMRenderer = ReactFiberReconciler({
224227 internalInstanceHandle : Object ,
225228 ) : void {
226229 if ( shouldAutoFocusHostComponent ( type , newProps ) ) {
227- ( domElement : any ) . focus ( ) ;
230+ ( ( domElement : any ) : HTMLInputElement ) . focus ( ) ;
228231 }
229232 } ,
230233
You can’t perform that action at this time.
0 commit comments