Browse Source
Bugfix/fix algebraic sign in value component (#1811)
* Fix algebraic sign by resetting member variables
* Update changelog
pull/1812/head
Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
0 deletions
-
CHANGELOG.md
-
libs/ui/src/lib/value/value.component.ts
|
|
@ -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/), |
|
|
|
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 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|