GetTerminus / terminus-oss

A collection of open source libraries.
MIT License
11 stars 10 forks source link

fix(ui-sidenav): Add markForCheck when isPanelOpen state changes #581

Closed CaioRolla closed 2 years ago

CaioRolla commented 2 years ago

The TsSidenavTriggerComponent uses ChangeDetectionStrategy.OnPush strategy for change detection, but rely on the change of the _isPanelOpen attribute to control if the panel is open or not.

This is not a problem when tha change of the attribute comes from within the component (the user action will trigger the change detection anyway), but when the attribute is changed from the outside of the component, the change does not trigger change detection.

This PR enables the component's consumers to close the drawer from the "outside".