Skip to content

Commit

Permalink
fix(stark-ui): fix ViewDestroyedError issue linked to formControl u…
Browse files Browse the repository at this point in the history
…sage

Modifying formControl value after destroying `stark-date-picker` or `stark-datetime-picker`
components triggers the following error:
  `Error: ViewDestroyedError: Attempt to use a destroyed view: detectChanges`

ISSUES CLOSED: NationalBankBelgium#2874
  • Loading branch information
SuperITMan committed Aug 10, 2021
1 parent 5730013 commit 9fe5297
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ export class StarkDatePickerComponent
this._value = value;
this.stateChanges.next();
}
this.cdRef.detectChanges();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ export class StarkDateTimePickerComponent
});
}
this._value = value;
this.cdRef.detectChanges(); // to refresh all the validations in the internal date picker
this.stateChanges.next();
}

Expand Down

0 comments on commit 9fe5297

Please sign in to comment.