I am trying to set a Repeater Data container, which works just like a charm for other pages. But not here. Why? What am I doing wrong?
Also, I DO get data into the container if I clear out my local storage data, but I really want to use what is in there if at all possible. This is what I do to set/fetch from local storage:
The data is there, as you can see from the first image. But for some reason, it just won’t set…
According to the RepeaterData:
Setting a new Repeater Data is an async function which triggers rerender, and the new data will be available only after the next render phase, it’s designed this way for performance reasons.
Just put the new value into a variable and use it for setting to the Repeater and in your condition.
I’m not sure I understand the issue, is it related to the Repeater or is it a completely different question/issue?
My problem is that if I enable this line:
so that this part does not run:
The repeater container data is not being set by these lines:
This is what I don’t understand, since the local cache data is used to provide other sets of data on the page, but the repeat containers for some reason refuse to accept the data that are in these properties.
Here is a print statement of the stats.top content when fetching data from the server:
And here is the same, when fetching data from the local cache (which the Repeater Data Container refuses to accept):
I am probably missing something obvious, but I cannot see what…
make sure you use the correct “key” for Get/Set Local Storage Data blocks, you can print the value to see what values it uses
I am non the wiser, @vladimir-upirov
Here I have output’ed the ResultSet from Local Storage, first the one stored before entering the page (from last time), then the one I have just written to Local Storage right now. Last the variable contents just fetched from API.
I can navigate parts of the object, but not the “inner array of objects”, stored here in “stats.top” and “stats.bottom”. I see that they are just seen as arrays in the Local Storage, while they are seen as objects in the variable.
Does not the Local Storage methods support nested objects/arrays of objects? Do I have to decouple this to get things to work?
on the last screenshots, everything seems right,
could you please create a test page with minimum logic/UI just to be able to reproduce the issue?