I don’t want to display 1000 results, I am just saying that the database has 1000 rows, but I am only showing 12 of them. But still, filtering those 1000 is extremely slow. And I means 1000 rows should nott be crazy.
If I want to allow the user to define filters and display let’s say 12 results (4x3), is there another way to do that more efficiently than using repeater? Displaying the stuff in a table worked fine but it looked shit so that is why I went for a repeater
But it’s quite advanced and if you don’t have experience in coding, you probably won’t know how to build it. It will be easier if Wix releases an example for that.
@jonatandor35 Yes, probably too advanced for me. However, I will give it a go and see if I manage to do it. Is there a way to reach out to a Wix representative to make them release an example?
I am trying to change the filters, so I have multiple criterias, all coming from the different dropdowns I have (below myPriceRange, myCapacity, myRegion). If user does not have selected anything from some of the dropdowns yet, it might be that some variables are filled others are not.
let’s say, the user has only selected something for myPrice but not for capacity and region:
myPriceRange=“low”
myCapacity=“”
myRegion=“”
now the filter is not working correctly. Is there a way I can check that all conditions are met, however only the ones that are not blank (where there is a value selected in the dropdown). I tried with an if statement, but the wixDate.query does not like if statements inside the function
function filter2(myPriceRange,myCapacity,myRegion) {
wixData.query(“Wedding_Database”)
.eq(“price”, myPriceRange)
.eq(“capacity”, myCapacity)
.eq(“region”, myRegion)
.limit(12)
.find()
.then( r=> {
let myNewResults = r.items;