"Expression Has Changed" error when autoCollapseWidth is set and [(opened)] is true
joekaiser opened this issue · comments
Create a sidebar and set [(opened)]="sidebarOpen" autoCollapseWidth="860"
. If the page loads when sidebarOpen = true
and and the browser width is <860
, then angular throws a "Expression has changed after it was checked" error. If the browser width is >860
then the error goes away.
Obviously, this is because opened
is clashing with the auto collapse feature. Is there a known workaround for this? What I am looking to do is to have the sidebar shown by default, but if the page loads and the width is too small then it should be collapsed.
I have created a simple reproduction here https://codesandbox.io/s/ng-sidebar-error-pvr4e
Check the console for the error
@arkon I saw your comment here. #203 (comment) Is this repo still supported?
Is this repo still supported?
Barely. :)
I pushed out something that might help.
Thanks for the effort, but the bug still exists. See https://codesandbox.io/s/ng-sidebar-error-pvr4e for a demo.
Maybe i'll take a shot and do a PR