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.
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