Skip to content

Commit

Permalink
fix: adding new value for optional resource #DEV-3031 (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmastnt committed Jan 18, 2024
1 parent 45e0625 commit 420a564
Showing 1 changed file with 16 additions and 2 deletions.
@@ -1,4 +1,15 @@
import { AfterViewInit, Component, EventEmitter, Inject, Input, OnInit, Output, ViewChild } from '@angular/core';
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
EventEmitter,
Inject,
Input,
OnInit,
Output,
ViewChild,
} from '@angular/core';
import {
ApiResponseError,
Constants,
Expand All @@ -21,6 +32,7 @@ import {
import { ValueService } from '../../services/value.service';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-add-value',
templateUrl: './add-value.component.html',
styleUrls: ['./add-value.component.scss'],
Expand Down Expand Up @@ -62,7 +74,8 @@ export class AddValueComponent implements OnInit, AfterViewInit {
@Inject(DspApiConnectionToken)
private _dspApiConnection: KnoraApiConnection,
private _valueOperationEventService: ValueOperationEventService,
private _valueService: ValueService
private _valueService: ValueService,
private _cd: ChangeDetectorRef
) {}

ngOnInit() {
Expand Down Expand Up @@ -140,6 +153,7 @@ export class AddValueComponent implements OnInit, AfterViewInit {

// hide the progress indicator
this.submittingValue = false;
this._cd.markForCheck();
},
(error: ApiResponseError) => {
// hide the progress indicator
Expand Down

0 comments on commit 420a564

Please sign in to comment.