Repeating Layouts with filter effect...

Is their a way to have the have a search function that able to search for the title name within the new Repeating Layouts element? Just like the change effect with the table element.

Hi! Please, describe your usecase more, i’m not sure i got you

What do you mean by “search”? Show only specific element from the collection on Repeater?

Just like the change effect with the table element.

That didn’t help)

What you want to achieve? What is change effect? Our current table component doesn’t support search, you need top add textinput and filter on it

It’s because I have a search box and table they both work together to display a post I add in the collection, but instead of use a table to display the post I like the search box to connect toe the NEW Repeating Layout instead of the table element.

1 Like

If I am interpreting the question correctly, I have the same question. I would like to search the repeater element that is connected to a database of users by typing a name in a text box, hitting a search buttton and the repeater element only showing the relevant information. I hope that makes sense…Thank you.

Yea that was the question I tried to type.

Hi,

It is not possible to add a filter to repeaters similar to the way they are added to tables.

As a workaround, you can write a filter function that reads the current repeater data, removes unwanted data according to an input field and repopulates the repeater with the new information

I think less complicated way is to set filter to dataset, where repeater is connected

And add code like this:

import wixData from "wix-data";

export function button2_click(event, $w) {
	let searchString = $w("#input1").value;
	$w("#dataset1").setFilter(wixData.filter().eq("title", searchString));
}

$w(“#input1”) - it’s input where you enter string to search
button2 - button, which calls search
“title” - is field name, with which you try to search

I just setted up this and it works as it should

With this code how can you search in other cell if didn’t find keyword search in “Title” cell?

Thank you, Mikhail!

@Karson - you are welcome!
@arthosmaciel
Add more parts to filter with “or” function, it’s described here -

In this case either filter on 1st keyfield, or on 2nd field or… will work

Sorry I couldn’t figure out how add more to the filter code.

Hi again!
Excuse me, but i can’t write code instead of you

Exact usecase of having multiple filters with ‘or’ function described in reference…

Ok