Skip to content

Commit

Permalink
Revert "Number: fix not present in submission if empty"
Browse files Browse the repository at this point in the history
This reverts commit 05d8086.
  • Loading branch information
travist committed May 23, 2022
1 parent 8797509 commit 8510be8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dccache

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions src/components/number/Number.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ export default class NumberComponent extends Input {
return defaultValue;
}

get emptyValue() {
return '';
}

isDecimalAllowed() {
return _.get(this.component, 'allowDecimal', !(this.component.validate && this.component.validate.integer));
}
Expand Down Expand Up @@ -149,8 +145,7 @@ export default class NumberComponent extends Input {
}

const val = this.refs.input[index].value;
// Check if just '-' was entered
return val && val !== '-_' ? this.parseNumber(val) : this.emptyValue;
return val && val !== '-_' ? this.parseNumber(val) : null;
}

setValueAt(index, value, flags = {}) {
Expand Down

0 comments on commit 8510be8

Please sign in to comment.