Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: date-picker component still attached to control after destroy #2874

Closed
SuperITMan opened this issue Aug 5, 2021 · 0 comments · Fixed by #2890
Closed

ui: date-picker component still attached to control after destroy #2874

SuperITMan opened this issue Aug 5, 2021 · 0 comments · Fixed by #2890
Assignees
Milestone

Comments

@SuperITMan
Copy link
Member

SuperITMan commented Aug 5, 2021

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem

Current behavior

When stark-date-picker is removed, using *ngIf directive, changing the attached formControl triggers error

ERROR
Error: ViewDestroyedError: Attempt to use a destroyed view: detectChanges

Expected behavior

Changing value of formControl after destroying stark date-picker component should not trigger any error.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/stark-datepicker-issue-2874?file=main.ts

  1. Click on button "Hide picker"
  2. Click on button "Change date"

What is the motivation / use case for changing the behavior?

Fixing a bug

Environment


Angular version: 7.x
Stark version: 10.2.x


Others:

@SuperITMan SuperITMan added this to the 10.2.3 milestone Aug 5, 2021
@SuperITMan SuperITMan self-assigned this Aug 5, 2021
SuperITMan added a commit to SuperITMan/stark that referenced this issue Aug 10, 2021
…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
SuperITMan added a commit to SuperITMan/stark that referenced this issue Aug 10, 2021
…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
SuperITMan added a commit to SuperITMan/stark that referenced this issue Aug 10, 2021
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant