I have an issue where i am trying to query a dataset of over 3000 items and return the results to a drop down menu. The issue i’m having is that the query will only lookup the 1st 1000 rows of the dataset. Below is my code, how do i look up the full 3000 rows and return the results to a single drop down menu ?
import wixData from ‘wix-data’;
$w.onReady( function () {
uniqueDropDown();
});
function uniqueDropDown() {
wixData.query("Collection_Database")
.limit(1000)
.ascending("Column1")
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w("#uniqueDropDown").options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.Column1);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return { label: curr, value: curr };
});
}