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

NbSelect Change Detection Issue #1157

Closed
1 task
dpollastrini opened this issue Jan 15, 2019 · 3 comments · Fixed by #1299
Closed
1 task

NbSelect Change Detection Issue #1157

dpollastrini opened this issue Jan 15, 2019 · 3 comments · Fixed by #1299

Comments

@dpollastrini
Copy link

Issue type

I'm submitting a ... (check one with "x")

  • [* ] bug report
  • feature request

Issue description

Current behavior:
When assigning [selected] input on NbSelect component in template, ExpressionChangedAfterItHasBeenCheckedError is thrown.

Expected behavior:
ExpressionChangedAfterItHasBeenCheckedError is not thrown.

Steps to reproduce:

Place nb-select in template with [selected] input set (see referenced StackBlitz) and load page. Observe error in console.

Related code:

StackBlitz

Other information:

npm, node, OS, Browser

> node --version
v10.15.0
> npm --version
6.4.1

Angular, Nebular

Node: 10.15.0
OS: win32 x64
Angular: 7.2.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.2
@angular-devkit/build-angular     0.10.2
@angular-devkit/build-optimizer   0.10.2
@angular-devkit/build-webpack     0.10.2
@angular-devkit/core              7.0.2
@angular-devkit/schematics        7.2.1
@angular/cdk                      7.2.1
@angular/cli                      7.2.1
@angular/language-service         7.0.0
@ngtools/webpack                  7.0.2
@schematics/angular               7.2.1
@schematics/update                0.12.1
rxjs                              6.3.0
typescript                        3.1.3
webpack                           4.19.1


    "@nebular/theme": "3.0.0",
@Eve-Sama
Copy link
Contributor

Eve-Sama commented Feb 2, 2019

This problem performs in my project.

@kgrigorian
Copy link

having the same issue

@yggg yggg added this to the 3.4.0 milestone Feb 15, 2019
@Tibing Tibing assigned yggg and Tibing and unassigned yggg Feb 21, 2019
@yggg yggg assigned yggg and unassigned Tibing Mar 7, 2019
@yggg
Copy link
Contributor

yggg commented Mar 13, 2019

Fix is ready (#1299) and it'll land in 3.4.1.
Before the release, you could prevent this error by triggering change detection manually in the component where select is used.

ngAfterViewInit() {
  // ...
  this.changeDetectorRef.detectChanges();
}

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.

5 participants