My website: https://the-pwr.wixsite.com/fpdl-22/areas-atuacao-1
I implemented a database with all the information that I want displayed on the screen. To make things easier for the audience, I created a search bar and dropdown box to go thru the manus more quickly and efficiently since there are so many.
My Problem begins when I go to search for a keyword in the search bar (on the left), all the boxes bellow with the information disappear. The goal is to have the keywords match was is inside the box and only display what has been searched.
I used this video as a guide " https://www.youtube.com/watch?v=Hx7_8-lRsW0 "
I am able to follow the coding until minute 2:25. Beyond that point, I cannot seem to get my website to display the information like it does on the video above.
Another problem I am having is with the dropdown menu (on the right)
. I want it to display all the titles of the boxes but every time I try to link it to the database it does not show anything.
--------------------------------------------------------------
This is the coding that I am using on the page.
import wixData from "wix-data"; let lastFilterTitle; let debounceTimer; export function input_keyPress_1(event, $w) { if (debounceTimer) { clearTimeout(debounceTimer); debounceTimer = undefined; } debounceTimer = setTimeout(() => { filter($w('#input').value); }, 200); } function filter(title) { if (lastFilterTitle !== title) { $w('#dataset1').setFilter(wixData.filter().contains('Intro', title)); lastFilterTitle = title; } }
Here is a visual representation of my issue :
Thanks.
The content is translated to Portuguese but the method should be the same
Hi,
I feel the problem in this line
$w('#dataset1').setFilter(wixData.filter().contains('Intro', title));
are you sure the 'Intro' field has the values you are searching for?