Skip to content

Commit

Permalink
fix(popover): run markForCheck to detect changes if nb-layout has onP…
Browse files Browse the repository at this point in the history
…ush (#267)

Closes #266
  • Loading branch information
tibing-old-email authored and nnixaa committed Feb 22, 2018
1 parent 6e59b84 commit 7af0f62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/popover-test/popover-test.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*/

import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { NbDynamicToAddComponent } from '../layout-test/theme-dynamic-test.component';

@Component({
selector: 'nb-popover-test',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<nb-layout>
<nb-layout-column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export class NbPopoverDirective implements OnInit, OnDestroy {
* which will call {@link NbThemeService#appendToLayoutTop} and 'do' detectChanges,
* instead of performing this call by service client.
* */
this.containerRef.changeDetectorRef.markForCheck();
this.containerRef.changeDetectorRef.detectChanges();
this.place();
});
Expand Down

0 comments on commit 7af0f62

Please sign in to comment.