Skip to content

Commit

Permalink
FlowType tweaks from Sebastian's feedback RE facebook#8646
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jan 13, 2017
1 parent be0de34 commit 5c48f68
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/renderers/dom/fiber/ReactDOMFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ findDOMNode._injectFiber(function(fiber: Fiber) {
type DOMContainerElement = Element & { _reactRootContainer: ?Object };

type Container = Element;
type Props = { children ?: mixed };
type Props = {
autoFocus ?: boolean,
children ?: mixed,
};
type Instance = Element;
type TextInstance = Text;

Expand Down Expand Up @@ -105,7 +108,7 @@ function shouldAutoFocusHostComponent(
case 'input':
case 'select':
case 'textarea':
return !!(props : any).autoFocus;
return !!props.autoFocus;
}
return false;
}
Expand Down Expand Up @@ -224,7 +227,7 @@ var DOMRenderer = ReactFiberReconciler({
internalInstanceHandle : Object,
) : void {
if (shouldAutoFocusHostComponent(type, newProps)) {
(domElement : any).focus();
((domElement : any) : HTMLInputElement).focus();
}
},

Expand Down

0 comments on commit 5c48f68

Please sign in to comment.