Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80517 views
1
/**
2
* Copyright 2013-2015, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
* @providesModule AutoFocusMixin
10
* @typechecks static-only
11
*/
12
13
'use strict';
14
15
var focusNode = require("./focusNode");
16
17
var AutoFocusMixin = {
18
componentDidMount: function() {
19
if (this.props.autoFocus) {
20
focusNode(this.getDOMNode());
21
}
22
}
23
};
24
25
module.exports = AutoFocusMixin;
26
27