So we have a repeater that can be filtered with selection tags (information from the dataset). That works great. The issue I’m having is that it only loads 50 results in the repeater and when I click the “load more” it just resets the repeater without the filter.
I want the load more button to load more on the page while keeping the filter in mind.
Here is the code I have for the selection tag filters:
export function selectionTags1_change ( ) {
const selectedGenre = $w ( ‘#selectionTags1’ ). value ;
const selectedVoice = $w ( ‘#selectionTags2’ ). value ;
const selectedAvailable = $w ( ‘#selectionTags3’ ). value ;
loadDataToRepeater ( selectedGenre , selectedVoice , selectedAvailable );
}
export function selectionTags2_change ( ) {
const selectedGenre = $w ( ‘#selectionTags1’ ). value ;
const selectedVoice = $w ( ‘#selectionTags2’ ). value ;
const selectedAvailable = $w ( ‘#selectionTags3’ ). value ;
loadDataToRepeater ( selectedGenre , selectedVoice , selectedAvailable );
}
export function selectionTags3_change ( ) {
const selectedGenre = $w ( ‘#selectionTags1’ ). value ;
const selectedVoice = $w ( ‘#selectionTags2’ ). value ;
const selectedAvailable = $w ( ‘#selectionTags3’ ). value ;
loadDataToRepeater ( selectedGenre , selectedVoice , selectedAvailable );
}
function loadDataToRepeater ( selectedGenre , selectedVoice , selectedAvailable ) {
wixData . query ( collection )
. ascending ( “name” )
. hasAll ( ‘genres’ , selectedGenre )
. hasAll ( ‘voiceType’ , selectedVoice )
. contains ( “artistPage” , “yes” )
. hasAll ( “featuredYn” , selectedAvailable )
. find ()
. then ( results => {
$w ( ‘#repeater2’ ). data = results . items ;
});
}
Any help would be appreciated!