Browse Source

Merge pull request #13087 from vvlladd28/rule-node/time-unit/invalid-state

Fixed time-unit component not correctly calculating selected time
pull/13104/head
Igor Kulikov 2 years ago
committed by GitHub
parent
commit
290b0da877
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/modules/home/components/rule-node/common/time-unit-input.component.ts

2
ui-ngx/src/app/modules/home/components/rule-node/common/time-unit-input.component.ts

@ -177,7 +177,7 @@ export class TimeUnitInputComponent implements ControlValueAccessor, Validator,
}
private updatedModel(value: Partial<TimeUnitInputModel>, forceUpdated = false) {
const time = value.time * this.timeIntervalsInSec.get(value.timeUnit);
const time = isDefinedAndNotNull(value.time) ? value.time * this.timeIntervalsInSec.get(value.timeUnit) : null;
if (this.modelValue !== time || forceUpdated) {
this.modelValue = time;
this.propagateChange(time);

Loading…
Cancel
Save