I am trying to bypass pagination by a very simple code instead of it … simply by Auto Load Content on Scroll to create Lazy Loading.
this is my filtering code that is working tremendously:
import wixData from ‘wix-data’ ;
import wixUsers from ‘wix-users’ ;
$w.onReady( function () {
let user = wixUsers.currentUser.id;
wixData.query( “workpage” )
.ne (user ,wixUsers.currentUser.id)
.limit( 1 )
.find()
.then ( (results) => {
if (results.items.length > 0 ) {
$w( “#dynamicDataset” ).setFilter( wixData.filter().ne( “_owner” ,wixUsers.currentUser.id));
}
} )
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
});
});
now I want to add this code to auto scroll:
export function viewStrip_viewportEnter ( event ){
$w ( “#loadGif” ). show ();
$w ( " #dynamicDataset " ). loadMore ()
. then (() => {
$w ( “#loadGif” ). hide ();
});
}
how can I transplant both codes to work together I just can’t MAKE IT WORK ![]()