I am trying to display tags from my database as tags in my repeater. The Field key of the tags I want to display is operatorTypes.
I've pasted my code into the page console like so:
// For full API documentation, including code examples, visit https://wix.to/94BuAAs
$w.onReady(function () {
//TODO: write your page related code here...
export function repeater2_itemReady($item, operatorTypes, index) {
let tags = operatorTypes.tags;
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;
}
});
See attached for what I'm trying to achieve:
The options is not defined. Can you help ?