cancel
Showing results for 
Search instead for 
Did you mean: 
Community_Admin
Community Team Member
Community Team Member

Question

How to add a main header row that contains the column title of each row of data?

Answer

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();
}
});

});
  1. refresh and it should be working 🙂

Before:

Community_Admin_0-1634633390218.png

After:

Community_Admin_1-1634633390163.png

Was this article helpful?

Version history
Last update:
‎10-19-2021 01:50 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Need additional support?:

Community Support Request