@samitouri / QOS-React-2 / commits / f558b95584

Fix cycle in AutoFocusUtils

In 5c5d2ec182e4f517b7f3b865d0277ed0dc4f0abd I accidentally introduced a dependency cycle: AutoFocusUtils -> findDOMNode -> ReactDOMComponent -> AutoFocusUtils This breaks some tools internally. We're not actually using findDOMNode in AutoFocusUtils any more so we can just delete it.

Ben Alpert committed Oct 26, 2015 at 14:52 UTC f558b955843b0b1057709ddc4f844df45c00a5e9
1 file changed -11
src/renderers/dom/client/wrappers/AutoFocusUtils.js
-11
@@ -14,20 +14,9 @@
14
15 var ReactMount = require('ReactMount');
16
17 -var findDOMNode = require('findDOMNode');
17 var focusNode = require('focusNode');
18
20 -var Mixin = {
21 - componentDidMount: function() {
22 - if (this.props.autoFocus) {
23 - focusNode(findDOMNode(this));
24 - }
25 - },
26 -};
27 -
19 var AutoFocusUtils = {
29 - Mixin: Mixin,
30 -
20 focusDOMComponent: function() {
21 focusNode(ReactMount.getNode(this._rootNodeID));
22 },