The intention is being able to search the database either by city,state,price,name (title). I have the issue that the letters are cut in 1 in my log and the screen flickers a lot. Also searching for price seems to never work.
Can you help me? Also in a way that would be easy for me to know where to add more code without breaking it so I don’t need to ask for help again lol. I plan to add one more search on it “category”.
Is it possible to create a page and add code to search the Wix.com dashboard Members List? I would like to put a list of Members on my site with a different layout than the Members List app.
Hi, I’m having problems with the dropdown menu.
He does not appear the options he should. Can you help me find the problem? I would be grateful.
Name of the database with the items is (AnimeList)
the field that will be searched is:
The database with the filters is (LGorDBanime)
field of reference (title)
Search box id is (iTitle)
the ID of the dropdown menu is (LGorDB)
So this is the current state of my code:
import wixData from "wix-data";
$w.onReady(() => {
loadLGorDBanime();
});
let lastFilterTitle;
let lastFilterLGorDBanime;
let debounceTimer;
export function iTitle_keyPress(event, $w) {
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w('#iTitle').value, lastFilterLGorDBanime);
}, 500);
}
export function LGorDB_change(event, $w) {
filter(lastFilterTitle, $w('#LGorDB').value);
}
function filter(title, tipoDeEpisodio) {
if (lastFilterTitle !== title || lastFilterLGorDBanime !== tipoDeEpisodio) {
let newFilter = wixData.filter();
if (title)
newFilter = newFilter.contains('title', title);
if (tipoDeEpisodio)
newFilter = newFilter.contains('tipoDeEpisodio', tipoDeEpisodio);
$w('#dataset1').setFilter(newFilter);
lastFilterTitle = title;
lastFilterLGorDBanime = tipoDeEpisodio;
}
}
function loadLGorDBanime() {
wixData.query('LGorDBanime')
.find()
.then(res => {
let options = [{ "value": '', "label": 'Legendado e Dublado' }];
options.push(...res.items.map(tipoDeEpisodio => {
return { "value": tipoDeEpisodio.title, "label": tipoDeEpisodio.title };
}));
$w('#LGorDB').options = options;
});
}
Sorry for the size of the comment. I’m really bad at summarizing everything.
The code I used before trying this new one was inefficient and conflicted with the dropdwon menu.
@yisrael-wix
I’m sorry, but you visited the wrong page hahaha
they are identical, the only difference was the code and her name.
I added a button to differentiate the two now.
@yisrael-wix
yes it is this page, I just synchronized the database and publish, and also tested in 3 other browsers and for me the options are not displayed, I’m stumped.
@yisrael-wix
The editor is joking with me hahahaha
The function works in the preview version perfectly but it does not work in the online version hahaha
I do not believe a little thing like that gave me problems.
I’m embarrassed.
Every time I opened the database I would stuff the items there and it gave me the wrong impression.
haha
Thank you for helping me find the problem and sorry for anything @yisrael-wix .