Hey everyone!!
I need to display the tags included in my collection that has been collected via input element from a form.
I need it to look great on both mobile and desktop.
The collection field is tipoActividad.
So I’ve tried this using a tags input (#selectionTags2)
export function repeater1_itemReady($item, itemData, index){
//get tags from db for an item
let tags = itemData.tipoActividad;//prepeate hashmap with tags to be diplayed
let options = [];
for(var i =0; i < tags.length; i++){
options.push({"label": tags[i],"value": tags[i]});}//Set tags UI component
$item("#selectionTags2").options = options;
}
And the console reads:

But tags is defined…
And in this case, I used Text (#tags):
export function repeater1_itemReady($item, itemData, index) {
let tags = itemData.tipoActividad;
let tagsHtml = tags.map(tag =>
`<span style="background: #459fed;
border-radius: 5px;
padding: 0 3px;
color: #fff;
font-size: 12px>${tag}</span>`)
.join(' ');
$item('#tags').html = tagsHtml;
}
In this case, the console reads

But tags is defined…
Ive also tried this:
$w.onReady(function(){
$w('#selectionTags3').onChange(()=>{
const selectedTag =$w('#selectionTags3').value;
let filter = wixData.filter();
if(selectedTag.length >0){
filter = filter.hasSome("tipoActividad", selectedTag);
}
$w('#dataset1').setFilter(filter);
})
});
But nothing happens....
what am I missing???
I really appreciate it if anyone could share some advice on this.
Its driving me nuts.
and yes, I have wix data above this code. ![]()
Thank you!!!