-
Notifications
You must be signed in to change notification settings - Fork 78
[Quick Filter] Programatically adding active [filters] causes ExpressionChangedAfterItHasBeenCheckedError and prevents handler from firing #1305
Comments
Hey @areknow thanks for providing a reproduction example and opening up the issue. Regarding the ExpressionChangedAfterChecked error - this is definitely something we need to check out. |
At this point we are assuming that this is a problem when running in viewEngine. @areknow can you confirm that the app you have noticed this problem in, is running in viewEngine (we know that stackblitz is running viewEngine)? |
@ffriedl89 Sure that makes sense, thank you for the explanation about the event handler! @gselltho I can confirm that my application is using viewEngine. Thanks guys! |
@tomheller I just enabled Ivy in my app but I am still seeing the ExpressionChangedAfterChecked error. Maybe there is something else going on? |
Another interesting update: The error is only happening to me locally. After building it in dev through our pipeline (jenkins), the error is not visible in the dev env. Locally I did a full Thanks! |
@areknow can you try building the app locally with AOT? (Ahead of time compilation). You can enable this by setting the I think this is an JIT (just in time) compilation problem – that should be the reason why you don't see it in your dev environment. In general since version 9 you should use AOT for compilation: |
For the record, there is also a call-sync scheduled to investigate this issue further. Thanks @areknow for setting this up. |
@lukasholzer thanks for the reply! |
This is getting really weird. We have also tried this in our development application with every possible permutation of |
@tomheller sounds good! |
@tomheller I was able to reproduce the issue in a fresh project: https://github.com/areknow/barista-quick-filter-bug Still happy to meet at our planned time 👍 |
Thanks to @areknow we were able to track down the source of the problem in the setup he provided. Unfortunately we are still not able to reproduce it in any of our applications within the repository, which is somewhat worry-some. |
Fixes an expression changed after checked error that was thrown in the filter field. Thank you @areknow for pointing that out and helping us investigate. Fixes dynatrace-oss#1305
Bug Report
When using the DtQuickFilter component and passing in an array of filters into the [filters] input, the component does not react as required like the DtFilterField does.
What should happen
The DtQuickFilter component should react appropriately to filters passed into the [filters] input. Then the (filterChanges) event should be fired.
What happens currently
The DtQuickFilter component accepts the filters passed into [filters], but does not fire the event handler, and also the console shows a ExpressionChangedAfterItHasBeenCheckedError.
Demo
https://stackblitz.com/edit/github-mpgcfd?file=src%2Fquick-filter%2Fquick-filter-default-example%2Fquick-filter-default-example.ts
Thank you!
Arnaud
The text was updated successfully, but these errors were encountered: