mirror of
https://github.com/DragonMinded/bemaniutils.git
synced 2026-10-14 10:09:06 +03:00
Initial commit of BEMANI Utilities to GitHub.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/** @jsx React.DOM */
|
||||
|
||||
var SelectUser = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<select
|
||||
name={this.props.name}
|
||||
disabled={this.props.disabled}
|
||||
value={this.props.value ? this.props.value : "__NOBODY_VALUE__"}
|
||||
onChange={function(event) {
|
||||
var owner = event.target.value;
|
||||
if (owner == "__NOBODY_VALUE__") {
|
||||
owner = null;
|
||||
}
|
||||
if (this.props.onChange) {
|
||||
this.props.onChange(owner);
|
||||
}
|
||||
}.bind(this)}
|
||||
>
|
||||
<option className="placeholder" value="__NOBODY_VALUE__">nobody</option>
|
||||
{this.props.usernames.map(function(username) {
|
||||
return <option value={username}>{ username }</option>;
|
||||
}.bind(this))}
|
||||
</select>
|
||||
);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user