Add display names to controlled components

These show up as Unknown in the DevTools. They also wrap a native component,
so they show up double.
This commit is contained in:
Sebastian Markbage
2014-01-02 18:30:39 -08:00
committed by Paul O’Shannessy
parent f3e774559f
commit cbefc5a968
6 changed files with 11 additions and 0 deletions
+2
View File
@@ -45,6 +45,8 @@ var mouseListenerNames = keyMirror({
* when `disabled` is set.
*/
var ReactDOMButton = ReactCompositeComponent.createClass({
displayName: 'ReactDOMButton',
mixins: [AutoFocusMixin],
render: function() {
+2
View File
@@ -33,6 +33,8 @@ var form = ReactDOM.form;
* composite component and use `componentDidMount` to attach the event handlers.
*/
var ReactDOMForm = ReactCompositeComponent.createClass({
displayName: 'ReactDOMForm',
render: function() {
// TODO: Instead of using `ReactDOM` directly, we should use JSX. However,
// `jshint` fails to parse JSX so in order for linting to work in the open
+2
View File
@@ -50,6 +50,8 @@ var instancesByReactID = {};
* @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
*/
var ReactDOMInput = ReactCompositeComponent.createClass({
displayName: 'ReactDOMInput',
mixins: [LinkedValueMixin, AutoFocusMixin],
getInitialState: function() {
+1
View File
@@ -28,6 +28,7 @@ var option = ReactDOM.option;
* Implements an <option> native component that warns when `selected` is set.
*/
var ReactDOMOption = ReactCompositeComponent.createClass({
displayName: 'ReactDOMOption',
componentWillMount: function() {
// TODO (yungsters): Remove support for `selected` in <option>.
+2
View File
@@ -100,6 +100,8 @@ function updateOptions() {
* selected.
*/
var ReactDOMSelect = ReactCompositeComponent.createClass({
displayName: 'ReactDOMSelect',
mixins: [LinkedValueMixin, AutoFocusMixin],
propTypes: {
+2
View File
@@ -46,6 +46,8 @@ var textarea = ReactDOM.textarea;
* `defaultValue` if specified, or the children content (deprecated).
*/
var ReactDOMTextarea = ReactCompositeComponent.createClass({
displayName: 'ReactDOMTextarea',
mixins: [LinkedValueMixin, AutoFocusMixin],
getInitialState: function() {