|
@@ -29,11 +29,11 @@ export class FloatLineComponent extends React.Component<IFloatLineComponentProps
|
|
|
constructor(props: IFloatLineComponentProps) {
|
|
|
super(props);
|
|
|
let currentValue = this.props.target[this.props.propertyName];
|
|
|
- this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 2)) : "0" };
|
|
|
+ this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 4)) : "0" };
|
|
|
this._store = currentValue;
|
|
|
|
|
|
let rexp = "(.*\\.";
|
|
|
- let numDigits = this.props.digits || 2;
|
|
|
+ let numDigits = this.props.digits || 4;
|
|
|
while (numDigits--) {
|
|
|
rexp += ".";
|
|
|
}
|
|
@@ -49,7 +49,7 @@ export class FloatLineComponent extends React.Component<IFloatLineComponentProps
|
|
|
}
|
|
|
|
|
|
const newValue = nextProps.target[nextProps.propertyName];
|
|
|
- const newValueString = newValue ? this.props.isInteger ? newValue.toFixed(0) : newValue.toFixed(this.props.digits || 2) : "0";
|
|
|
+ const newValueString = newValue ? this.props.isInteger ? newValue.toFixed(0) : newValue.toFixed(this.props.digits || 4) : "0";
|
|
|
|
|
|
if (newValueString !== nextState.value) {
|
|
|
nextState.value = newValueString;
|