Show array in Repeater Text Box

Thank you @russian-dima I didn’t realize you had to use an object in the repeater. Also that I should only be using one onReady().
I made it work, here is the code:


import wixData from ‘wix-data’ ;

$w . onReady (() => {
countryDrop ();
});

//Country dropdown with unique values
function countryDrop ( ){
wixData . query ( “Wine” )
. limit ( 1000 )
. find ()
. then ( results => {
const uniqueTitles = getUniqueTitles ( results . items );
$w ( “#countryDrop” ). options = buildOptions ( uniqueTitles );
});
function getUniqueTitles ( items ) {
const titlesOnly = items . map ( item => item . country );
return [… new Set ( titlesOnly )];
}
function buildOptions ( uniqueList ) {
return uniqueList . map ( curr => {
return { label : curr , value : curr };
});
}
}
});