You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work in a project where all components (app.component included) use ChangeDetectionStrategy.OnPush. When I step through the tour, the click on 'next' will not update the highlighted element and the text, if the next element has an action.
steps to reproduce
use ChangeDetectionStrategy.OnPush in your root (app.component.ts)
implement a tour with three steps
set action of the second step to () => { }
start the tour
click on 'next' in step one
expected behaviour
The element of step two is highlighted, the correct text is shown
actual behaviour
The element of step one is highlighted and its text is shown
my dicoveries
updating app.component to ChangeDetectionStrategy.Default fixes the issue
a click on the step text itself after the next in step one updates the view and step two is correctly shown
a click on next in step one does update the buttons, the prev-button appears
the setTimeout following part seems to be crucial:
if(this._currentTour.steps[this._currentTourStepIndex].action){this._currentTour.steps[this._currentTourStepIndex].action();// Usually an action is opening something so we need to give it time to render.setTimeout((/** * @return {?} */()=>{
The text was updated successfully, but these errors were encountered:
Chris380
changed the title
Next step is not updated when it has an action defined and root component usesChangeDetectionStrategy.OnPush
Next step is not updated when it has an action defined and root component uses ChangeDetectionStrategy.OnPush
Aug 18, 2021
I work in a project where all components (app.component included) use ChangeDetectionStrategy.OnPush. When I step through the tour, the click on 'next' will not update the highlighted element and the text, if the next element has an action.
steps to reproduce
expected behaviour
The element of step two is highlighted, the correct text is shown
actual behaviour
The element of step one is highlighted and its text is shown
my dicoveries
setTimeout
following part seems to be crucial:The text was updated successfully, but these errors were encountered: