Bugfix/fix algebraic sign in value component (#1811)
* Fix algebraic sign by resetting member variables * Update changelog
This commit is contained in:
@@ -37,6 +37,8 @@ export class ValueComponent implements OnChanges {
|
||||
public constructor() {}
|
||||
|
||||
public ngOnChanges() {
|
||||
this.initializeVariables();
|
||||
|
||||
if (this.value || this.value === 0) {
|
||||
if (isNumber(this.value)) {
|
||||
this.isNumber = true;
|
||||
@@ -120,4 +122,12 @@ export class ValueComponent implements OnChanges {
|
||||
this.useAbsoluteValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
private initializeVariables() {
|
||||
this.absoluteValue = 0;
|
||||
this.formattedValue = '';
|
||||
this.isNumber = false;
|
||||
this.isString = false;
|
||||
this.useAbsoluteValue = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user