import {local} from 'wix-storage';
$w.onReady( () => {
$w("#items").onReady( () => {
console.log(local.getItem("key"));
'setCurrentPageIndex would go here...
} );
} );
export function boxL_viewportEnter(event) {
$w("#items").loadMore()
.then(()=>{
let currentItemIndex = $w("#items").getCurrentItemIndex();
let currentPageIndex = $w("#items").getCurrentPageIndex();
console.log(currentItemIndex)
console.log(currentPageIndex)
local.setItem("ItemIndex", currentItemIndex);
local.setItem("PageIndex", currentPageIndex);
})
}
Which results do you get in CONSOLE ?