-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
observe not working with repeat #6850
Comments
Thanks for this issue - while I see you have some example code above it would be great if you could put together a min-repro with stackblitz someone can dig into. |
Hi @chrisdholt I tried to replicate the issue but cannot do it on Stackblitz (it's working fine). It seems that the issue relies somewhere in the build part of my application. I am using the esbuild and i am bundling dependencies of my package as seperate JavaScripts. When I bundle everything in single JS everything works as expected, but when i have the fast-element imported over importmap it ignores reactive totally for some reason. I will try to investigate more to find where the issue comes from |
Thanks for this - I wonder if this could be related to the fact that |
@chrisdholt Not sure i am importing it using
JS loads fine but just reactive function does not react to changes for some reason. When i bundle everything in single JS it works normally. Still trying to figure out why |
Is there some special requirement for state.js in order for it to work? If I take a look at the reactive method in both, there is no difference but it only works when all is bundled together. |
Okay the issue is that apparently state.js has some references on fast-element itself internally so I guess that duplicate code in those two files is making a problem |
🐛 Bug Report
I created a simple navigation component containing
_menuItems
array:Since I want to observe the properties of the objects in code when I am loading the menu items list I set it like this:
Then i have the method which changes the active property on the route change:
But when the active property is changed, rerendering of the menu item does not happen.
🤔 Expected Behavior
I would expect for an active class to change on the menu item click
😯 Current Behavior
It does not trigger rendering of menuItems on active property change
🌍 Your Environment
The text was updated successfully, but these errors were encountered: