mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
[React.14] Add checkedLink/valueLink to HTMLAttributes for LinkedStateMixin
This commit is contained in:
+19
-2
@@ -466,8 +466,25 @@ React.createFactory(CSSTransitionGroup)({
|
||||
// LinkedStateMixin addon
|
||||
// --------------------------------------------------------------------------
|
||||
React.createClass({
|
||||
mixins: [LinkedStateMixin],
|
||||
render: function() { return React.DOM.div(null) }
|
||||
mixins: [LinkedStateMixin],
|
||||
getInitialState: function() {
|
||||
return {
|
||||
isChecked: false,
|
||||
message: "hello!"
|
||||
};
|
||||
},
|
||||
render: function() {
|
||||
return React.DOM.div(null,
|
||||
React.DOM.input({
|
||||
type: "checkbox",
|
||||
checkedLink: this.linkState("isChecked")
|
||||
}),
|
||||
React.DOM.input({
|
||||
type: "text",
|
||||
valueLink: this.linkState("message")
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user