Pagination can't be used with a filtered repeater data set?

Can I apply pagination to a filtered repeater set?

Yes. The pagination applies to the current items in the dataset.

But it’s not working on filtered dataset

It should work. What’s it doing? Or should I say not doing? You’ll need to provide more information.

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 :woozy_face:

What exactly isn’t working? What happens when you load the page? What happens when viewportEnter?

Well nothing is happening. Like it doesn’t exist…

Nothing happens when you load the page?

Ahh sorry. The repeater loading, I limit to two items, the gif I dont see , nor the strip

Please post the URL and explain how to see the problem.

how do you limit to 2? why should you see the strip? you’ll only see the gif if you are loading more

yes that’s correct I fixed it thank you:

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))
$w( “#loadingStrip” ).onViewportEnter( (event) => {
$w( “#loadingGif” ).show();
$w( “#dynamicDataset” ).loadMore()
.then(()=>{
$w( “#loadingGif” ).hide();
});
});
}
})
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
});
});

and of course no one from wix responded.

This is an old post - and was resolved.

And I’m from Wix.

Sorry Yisrael, the frustration overtook me at that point. I think the issue we are all having is not being able to set pagination to any array, it has to come from a query in a dataset. Some information I have on my page is generated information. We cant us the pagination bar on that information. It used to be able to be used that way but it was changed no?

Like Yisrael already mentioned - - > feel free to open your own post, with your own in detail described issue. Put some screenshots and other helpful information which could help to resolve your problem faster.

The more - → INPUT - - > the more - - > OUTPUT!

There will be always points where we get frustrated, because something do not work or seems to be not possible to be resolved, but in most cases, there is always an alternative way.