https://www.wix.com/corvid/example/search Hello!
I did the search exactly following the example, but it does not work. Please help me, very urgently needed!
Thank you in advance


import wixData from "wix-data"; $w.onReady(() => { loadContinents(); }); let lastFilterSpecies; let lastFiltergenomeComposition; let debounceTimer; export function iSpecies_keyPress(event, $w) { if (debounceTimer) { clearTimeout(debounceTimer); debounceTimer = undefined; } debounceTimer = setTimeout(() => { filter($w('#iSpecies').value, lastFilterSpecies); }, 500); } export function iGenome_change(event) { filter(lastFilterSpecies, $w('#iGenome').value); } function filter(species, genomeComposition) { if (lastFilterSpecies !== species || lastFiltergenomeComposition !== genomeComposition) { let newFilter = wixData.filter(); if (species) newFilter = newFilter.contains('articleTitle', species); if (genomeComposition) newFilter = newFilter.contains('genomeComposition', genomeComposition); $w('#Gemini').setFilter(newFilter); lastFilterSpecies = species; lastFiltergenomeComposition = genomeComposition; } } function loadContinents() { wixData.query('Continents') .find() .then(res => { let options = [{"value": '', "label": 'All Continents'}]; options.push(...res.items.map(continent => { return {"value": continent.title, "label": continent.title}; })); $w('#iGenome').options = options; }); } export function iSpecies_change(event) { //Add your code for this event here: } export function iSpecies_keyPress_1(event) { //Add your code for this event here: } function toggleFold(index) { let $fold = $w('#fold' + index); let $arrowDown = $w('#arrowDown' + index); let $arrowRight = $w('#arrowRight' + index); // toggle the fold at the index if ($fold.collapsed) { $fold.expand(); $arrowDown.show(); $arrowRight.hide(); } else { $fold.collapse(); $arrowDown.hide(); $arrowRight.show(); } // collapse the other folds [1,2,3,4] .filter(idx => idx !== index) .forEach(idx => { $w('#fold' + idx).collapse(); $w('#arrowDown' + idx).hide(); $w('#arrowRight' + idx).show(); }) }
Is your database actually called continents?
No, Gemini-one
@qoobbell then you would, as Yisrael says, need to make more changes to the code.
e.g.
You didn't "exactly" follow the example. You made changes based on your needs, but you then need to make sure that you make all of the changes to the code that are required.
Please check the latest screenshots and code
@qoobbell In your page's onReady() function you call a routine called loadGemini() or loadGemini-one() but you don't have that function in your code. As you can see, you have errors flagged.
Maybe what you meant was
BTW - The name loadGemini-one is invalid, a dash cannot be used in a function or variable name. The name Gemini-one for the collection is OK however.
I would suggest starting with the example. Once you see it working, you can then make changes to the code to adapt to your requirements.
@Yisrael (Wix) So where can I get the correct function name?