Remember Position Inquiry for Infinite Scroll.

You have a —> setter

import {local} from 'wix-storage';

local.setItem("key", "value");

and a —> getter

import {local} from 'wix-storage';

let value = local.getItem("key"); 

First you have to set something, before you can get it.

You have to save the current “page-index”, everytime when the page-index changes and set it to the local-storage.

See here…

This would save the current page-index of your dataset into local-storage.

import {local} from 'wix-storage';

let myValue = $w("#myDataset").getCurrentPageIndex()
local.setItem("key", myValue);

And then you would just have to load it, when you need the las current state of the page-index (stored in the wix local storage).

With this one, you would be able to get back the last saved state of the page-index.

let myValue = local.getItem("key"); 

Everytime, when you “loadMore” data, the page-index should normaly change.

Perhaps you could also work with …

Good luck and happy new year!