Page MenuHomeSealhub

input.jsx
No OneTemporary

Authored By
Unknown
Size
837 B
Referenced Files
None
Subscribers
None

input.jsx

var React = require('react');
var ReactDOM = require("react-dom");
var Input = React.createClass({
componentDidMount: function() {
this.selectText();
},
selectText: function(with_focus){
this.refs.input.focus()
var direction;
if (this.props.selectionStart <= this.props.selectionEnd) direction = "forward"
else direction = "backward"
this.refs.input.setSelectionRange(this.props.selectionStart, this.props.selectionEnd, direction);
},
render: function() {
return (
<div>
<textarea
className="input"
type="text"
value={this.props.beginText}
onChange={this.props.handleChange}
onSelect={this.props.handleChange}
onFocus={this.selectText}
onClick={this.alertOnMouse}
onKeyDown={this.props.increaseCounter}
ref="input" />
</div>
);
}
});
module.exports = Input;

File Metadata

Mime Type
application/javascript
Expires
Fri, Nov 27, 20:23 (4 h, 9 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1227656
Default Alt Text
input.jsx (837 B)

Event Timeline