Apparently the observable on Page 2 gets detached after going away from the page and navigating again to it. Although in JS the observable contains the right values, in UX it becomes blank.
Damn, they were right - I should have kept quiet
/downloads/channel/qa
But that is a possibly not yet production ready version, so try it at your own risk.
Given the issue above, I would suggest you wait for a new release.
Perhaps fuse should ask for some metadata when creating a new forum thread. Like OS, and Fuse version, and device. Then everything could be filtered specifically.
Btw if I’m understanding your problem correctly, I don’t think its a bug, the Observable should clear, because Navigator gets rid of that view and recycles it when needed, which means the JS is also recycled therefore the Observable would be cleared. What you want to do is store the data, on storage, or perhaps as a JS module and then require it everytime that view is activated. Kind of like how hikes.js is setup here: https://www.fusetools.com/docs/tutorial/splitting-up-components
It is a bug first of all because it used to work and second because the gui ignores the values in the observable starting with the second load.
Strange bonus behaviour: an items.add in the global scope, above the onActivated handler, gets picked up every time.
Perhaps fuse should ask for some metadata when creating a new forum thread. Like OS, and Fuse version, and device. Then everything could be filtered specifically.
That was one of the usage patterns for the new forum we considered but decided against because it would lead to more noise and confusion (some users would fill it in, others wouldn’t, making the data unreliable). In addition, that type of data is likely to change as the troubleshooting process began, so what was then declared when the thread began wouldn’t necessarily be relevant or accurate further down in the discussion, leading to further confusion.
One other usage question: the new Activated trigger accepts a Handler attribute, but passing a js function name ({handler}) yields an argument type error. What is the use of that parameter?
Thanks
When I test your example, the behavior I observer and that you described happen in 0.25, when I test in 0.24 to see if this is a regression it behaves just the same there.
Can you share the code you used in 0.24 where you say it worked?
Can’t retest now and the source code is rather large.
But all in all it appears to be a problem, right? I mean that observable should never appear blank in the ui…
I will try to test the example on .24 the first chance I get. I only tried to replicate the peoblem, haven’t actually checked this exact sample on .24.
Indeed, on that sample it seems to behave the same on .24. Yet, it’s still a bug. May not be a regression, though.
Sorry about the confusion.
In the original code, on that exact page I may have just called a loading function outside any handler, which meant it was loading it on each navigation event. When I tried placing the logic inside Activated, which seemed more logical than executing a function upon loading the JS file, that happened.
Oh, I know. But I like to think I’m preventing others bashing their heads against their desks when something like this happens. Although you do all the hard work
Maybe it helps: the same example works fine if we’re using a LinearNavigation instead of the Navigator. Activated gets properly called and the observable is carried over nicely.
I am facing the same problem… Fuse Version 0.27.1 Build 7935
Observable leaves a blank space in UI when i change a Page although i tested the Observable to see if it has any null or empty fields but always is filled with the exact number of items i pass to it.
Sorry for the late reply, had my PHP hat on for a while.
The issue is still there and still strange. On .28. With the code at the top, even if in the console I see “called” each time I reach page 2, I only see the number added into the items var the first time the page is visited.