Bugfix/fix algebraic sign in value component (#1811)
* Fix algebraic sign by resetting member variables * Update changelog
This commit is contained in:
parent
f92ba54060
commit
b37df2c84f
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue with the algebraic sign in the value component
|
||||||
|
|
||||||
## 1.248.0 - 2023-03-25
|
## 1.248.0 - 2023-03-25
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -37,6 +37,8 @@ export class ValueComponent implements OnChanges {
|
|||||||
public constructor() {}
|
public constructor() {}
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
|
this.initializeVariables();
|
||||||
|
|
||||||
if (this.value || this.value === 0) {
|
if (this.value || this.value === 0) {
|
||||||
if (isNumber(this.value)) {
|
if (isNumber(this.value)) {
|
||||||
this.isNumber = true;
|
this.isNumber = true;
|
||||||
@ -120,4 +122,12 @@ export class ValueComponent implements OnChanges {
|
|||||||
this.useAbsoluteValue = true;
|
this.useAbsoluteValue = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private initializeVariables() {
|
||||||
|
this.absoluteValue = 0;
|
||||||
|
this.formattedValue = '';
|
||||||
|
this.isNumber = false;
|
||||||
|
this.isString = false;
|
||||||
|
this.useAbsoluteValue = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user