Hi, I have issues with Wix database collection. It did not display all results.
For example, I search for Genre [Comedy] then it displays only 50 results when there are more than 50 in the database.
Is there a way that I can display all the results.
Code below:
export function resetBtn_click(event, $w) {
$w("#lalitaTable").hide();
$w("#searchBar").value = '';
$w("#titleBy").value = '';
$w("#genreBar").selectedIndex = undefined;
}
export function srchBtn_click(event, $w) {
let recentStaffingLevel = $w('#titleBy');
let name = $w('#searchBar');
let genre = $w('#genreBar');
if ( name.value === '' && recentStaffingLevel.value === '' && genre.value !== '' ) {
wixData.query('lalista').contains('genre', genre.value)
.ascending('name')
.find()
.then(res => {
if(res.items.length > 0){
$w("#lalitaTable").show();
$w("#textResults").hide();
$w("#lalitaTable").rows = res.items;
} else {
$w("#lalitaTable").hide();
$w("#textResults").show();
}
})
// End 3 Single Search
}
} // end export function
screenshot: https://www.screencast.com/t/oLyeYcytWr
thank you so much that sold the issues.
Hi Johathan,
There is a limit function where you can specify up to 1000. Without it, wixData.query defaults to 50.