vaguely skin MemberInfo correctly
This commit is contained in:
parent
430c90f4a4
commit
8e1ab8e6b4
4 changed files with 83 additions and 31 deletions
|
@ -49,10 +49,16 @@ module.exports = React.createClass({
|
|||
this.props.onChange(this.getValue());
|
||||
},
|
||||
|
||||
onCustomChange: function(event) {
|
||||
onCustomBlur: function(event) {
|
||||
this.props.onChange(this.getValue());
|
||||
},
|
||||
|
||||
onCustomKeyDown: function(event) {
|
||||
if (event.key == "Enter") {
|
||||
this.props.onChange(this.getValue());
|
||||
}
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
var value;
|
||||
if (this.refs.select) {
|
||||
|
@ -72,7 +78,7 @@ module.exports = React.createClass({
|
|||
input = <span>{ this.props.value }</span>
|
||||
}
|
||||
else {
|
||||
input = <input ref="custom" type="text" size="3" defaultValue={ this.props.value } onChange={ this.onCustomChange } />
|
||||
input = <input ref="custom" type="text" size="3" defaultValue={ this.props.value } onBlur={ this.onCustomBlur } onKeyDown={ this.onCustomKeyDown }/>
|
||||
}
|
||||
customPicker = <span> of { input }</span>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue