Table data doesn't show when filtered in pagination page 2.

Hi.
I have a table with pagination. Whenever I navigate to page 2 and do a filter and the table will show blank. It doesn’t have any issue when filtering on other pages.

Is there any way to force the table to go back to page 1?
My website : https://www.dwellintern.com/InternshipListings
My code :
export function searchButton_onClick() {
//Add your code for this event here:

let filterText = $w(‘#dropdown4’).value;
let filterText2 = $w(‘#input13’).value;
let filterText3 = $w(‘#dropdown5’).value
let filterText4 = $w(‘#input14’).value
console.log(“F1=” + filterText);
console.log(“F2=” + filterText2);
console.log(“F3=” + filterText3);
console.log(“F4=” + filterText4);
$w(‘#datasetJobApplication’).setFilter(wixData.filter()
.contains(‘dropdownField’,filterText)
.contains(‘position2’,filterText2)
.contains(‘position’,filterText3)
.contains(‘firstName’,filterText4)
)
.then( () => {
console.log(“Filter successfully.”);
console.log($w(‘#datasetJobApplication’).getTotalCount());
$w(“#table1”).refresh();
})
. catch ( (err) => {
console.log(“setFilter error encountered, err=”+err);
});
}

What are you using to switch trough pages?

Can you show that functionality?

I would look at making your table the exact height to begin with so that you do not get any scroll bars on the side of it.

Okay after looking at your site and trying it myself on a test site, it does look like it is more of a bug to do with the table than an issue with the code itself.

I had used your code and also changed it to a simpler version of it here and I am still getting the same error if I do the search from another page other than 1.

Although sometimes it does actually show correctly, however you do it again and it goes blank and stays blank as you have found out yourself.

Plus, when it is blank there is no error shown as the table is still filtered with the choices, for some reason it is just not showing on the page.

import wixData from 'wix-data';

$w.onReady(function () {
});

export function searchButton_click(event) {
$w('#datasetJobApplication').setFilter(wixData.filter()
.contains('dropdownField', $w('#dropdown4').value)
.contains('position2', $w('#input13').value)
.contains('position', $w('#dropdown5').value)
.contains('firstName', $w('#input14').value)
)
.then( () => {
console.log("Filter successfully.");
console.log($w('#datasetJobApplication').getTotalCount());
})
.catch( (err) => {
console.log("setFilter error encountered, err="+err);
});
}

As you are setting the table up with pagination in the Wix Editor table settings itself, you would be best going through Wix Support first to see if there is a bug with the actual settings in the table’s own pagination settings.

If they tell you that it is not a problem for them as you have used code with it, then please reply back to the post and I can raise it with the Wix team to see if it is anything to do with the code that we are using etc.