Please check code in example editor. I think there is an mistake

At example editor there is mistake somewhere. I suppose where but i cant find what should be there. Does anyone from Wix Team can check it. Thanks

What is the problem that you are having?

Go to example editor in your post (link to your post in last above) and see in code. There something like this. I think there is missing something. When i preview also it doesnt work becaue of it. There should be if (continents) but it doesnt work as well…

function new_filter(title, continents) { l
et res = compareArrays(continents, lastFilterContinents);
if (lastFilterTitle !== title || !res) {
let newFilter = wixData.filter();
if (title)
newFilter = newFilter.contains(‘articleTitle’, title);
/// HEERE SHouldnt be something
newFilter = newFilter.hasSome(‘continent’, continents); $w(’ #dataset1 ').setFilter(newFilter).then( function () {
let count = $w(" #dataset1 ").getTotalCount(); }); l
astFilterTitle = title; lastFilterContinents = continents; } }

I dont how to edit sorry… haha

@ceglarnia I tried this out and it works fine. I can do a search, and then filter the search on selected continents. Everything works great.

What doesn’t work for you?

@yisrael-wix
In live example yes but go to Example template and than it opens in editor. When i preview in example template in Wix editor it doesnt work

in search button write “aust”. It doeasnt show anything and should australia.

in Your code there is like this. Does it mean that when there is no name of continent in article it doeasnt show anything? Does it mean that must be 2 filters togather gives “true” ?

newFilter = newFilter.contains(‘articleTitle’, title);
/// HEERE SHouldnt be something
newFilter = newFilter.hasSome(‘continent’, continents);

@yisrael-wix in other examples of search You had if (title) and if(continents), now isnt it that when i dont have continents checked , search (iTitle) doesnt work ?

ok I checked many times and see now. You have to check all continents to work because they are connected. I thought in search button You can also look for continents and for articles. Now i see in search You only see titles. Sorry for bothering.