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
{{ message }}
Repository navigation
Angular: zoneless tests and core components changes - #35749
PR applies changes for supporting Angular zoneless mode (default for new Angular 21+ apps). Zone-based apps keep working as before; no breaking changes.
component.ts: injects ChangeDetectorRef and passes it to NgEventsStrategy and EmitterHelper
events-strategy.ts: fireEvent and fireNgEvent call markForCheck after emitting, so code subscriptions (.subscribe(), instance.on()) re-render the view in zoneless apps
calling public options triggers markForCheck in component.ts. Form editing a one-way [formData] in place; internal state (hoveredElement, focusedElement) doesn't trigger change detection on hover
zone.run() / runOutsideAngular() are kept: no-op in zoneless apps, unchanged behavior in zone apps
tests: new zone and zoneless karma environments (nx-infra-plugin executor, shims) running tests/src/zone-modes, included in test:all; zone.js moved out of the common shim
The notification is still inside if (emitter.observers.length), so callback-only nested widgets are missed. For example, a toolbar button configured through items[].options.onClick can have no click emitter subscribers. Core _createActionByOption invokes fireEvent before executing the option callback separately (core/widget/component.ts:466–470); updating a plain host field in that callback does not notify Angular, leaving a zoneless view stale unless another change-detection trigger occurs. Cover user-configured option callbacks in the notification path and add a zoneless regression test, while preserving suppression for widget-internal callbacks.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The listener wrapper breaks supported object callbacks, and the shared scheduling changes still need browser regression validation in both Angular modes.
The DOM adapter explicitly accepts EventListenerObject callbacks (ListenCallback in packages/devextreme/js/__internal/core/dom_adapter.ts), not just functions. After this override is installed, registering a supported { handleEvent(...) { ... } } listener for mousemove, mouseover, or mouseout now throws TypeError: callback.call is not a function when the event fires. Preserve that callback contract by invoking handleEvent for object listeners.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR applies changes for supporting Angular zoneless mode (default for new Angular 21+ apps). Zone-based apps keep working as before; no breaking changes.
component.ts: injectsChangeDetectorRefand passes it toNgEventsStrategyandEmitterHelperevents-strategy.ts:fireEventandfireNgEventcallmarkForCheckafter emitting, so code subscriptions (.subscribe(),instance.on()) re-render the view in zoneless appsmarkForCheckin component.ts. Form editing a one-way[formData]in place; internal state (hoveredElement,focusedElement) doesn't trigger change detection on hoverzone.run()/runOutsideAngular()are kept: no-op in zoneless apps, unchanged behavior in zone appszoneandzonelesskarma environments (nx-infra-pluginexecutor, shims) runningtests/src/zone-modes, included intest:all; zone.js moved out of the common shim