Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22406901
input.jsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
837 B
Referenced Files
None
Subscribers
None
input.jsx
View Options
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
Details
Attached
Mime Type
application/javascript
Expires
Fri, Nov 27, 20:23 (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1227656
Default Alt Text
input.jsx (837 B)
Attached To
Mode
rTG Typing Golf
Attached
Detach File
Event Timeline