Skip to content

Commit

Permalink
#66,#65; Improve error tips; Fix voting style
Browse files Browse the repository at this point in the history
  • Loading branch information
ldwformat committed Sep 25, 2018
1 parent 4895064 commit d0cd293
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/components/Common/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ let Input = Radium(
onChange = e => {
let value = e.target.value;
let valid = false;
if (this.props.formatter) {
if (this.props.formatter && value) {
value = this.props.formatter(this.state.value, value);
}
if (this.props.validator) {
if (this.props.validator && value) {
valid = this.props.validator(value);
}
this.setState({ value, valid });
Expand Down
6 changes: 3 additions & 3 deletions app/components/Utility/AmountSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ class AmountSelector extends React.Component {
disabled={this.props.disabled}
type="number"
valueFromOuter
value={value || 0}
value={value}
size="small"
placeholder={this.props.placeholder}
onChange={this._onChange.bind(this)}
tabIndex={this.props.tabIndex}
style={{width: "100%", marginBottom: 0}}
style={{ width: "100%", marginBottom: 0 }}
/>
) : (
<Input
Expand All @@ -120,7 +120,7 @@ class AmountSelector extends React.Component {
placeholder={this.props.placeholder}
onChange={this._onChange.bind(this)}
tabIndex={this.props.tabIndex}
style={{width: "100%", marginBottom: 0}}
style={{ width: "100%", marginBottom: 0 }}
/>
)}
<div className="form-label select floating-dropdown">
Expand Down

0 comments on commit d0cd293

Please sign in to comment.