Skip to content

Commit 7096772

Browse files
author
Brian Vaughn
committed
FlowType tweaks from Sebastian's feedback RE facebook#8646
1 parent 3bc5595 commit 7096772

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/renderers/dom/fiber/ReactDOMFiber.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ findDOMNode._injectFiber(function(fiber: Fiber) {
5757
type DOMContainerElement = Element & { _reactRootContainer: ?Object };
5858

5959
type Container = Element;
60-
type Props = { children ?: mixed };
60+
type Props = {
61+
autoFocus ?: boolean,
62+
children ?: mixed,
63+
};
6164
type Instance = Element;
6265
type 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

0 commit comments

Comments
 (0)