Skip to content

Commit

Permalink
handle display of 0 in the number picker (metabase#4689)
Browse files Browse the repository at this point in the history
* handle 0

* cleanup
  • Loading branch information
kdoh authored Apr 7, 2017
1 parent 7ac9448 commit 80f4b6d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ export default class NumberPicker extends Component<*, Props, State> {
constructor(props: Props) {
super(props);
this.state = {
stringValues: props.values.map(v => String(v || "")),
stringValues: props.values.map(v => {
if(typeof v === 'number') {
return String(v)
} else {
return String(v || "")
}
}),
validations: this._validate(props.values)
}
}
Expand Down

0 comments on commit 80f4b6d

Please sign in to comment.