Add Non-Repeating Header To List Of Items
Question: How to add a main header row that contains the column title of each row of data?
Solution: You can solve it with a widget script, please follow these steps:
1. Add a class to your "title", or the part that you only want to repeat once (in our case it was a column set):
{
"type": "ColumnSet",
"class": "blox-titles",
"columns": [
{...
}
]
}
2. Add the following script in your widget script:
widget.on('ready', () => {
const items = Array.from($(prism.activeWidget && prism.activeWidget.oid === widget.oid ? '.blox-slides' : `widget[widgetid="${widget.oid}"] .blox-slides`));
items.forEach((item, index) => {
if (index > 0) {
const title = $(item).find('.blox-titles');
$(item).find('.blox-titles').hide();
}
});
});
3. refresh and it should be working 🙂
Before:

After:

Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022