Add non-repeating header to list of items
Using a non-carousel view (i.e "list") within blox,
I am trying to add a main header row that contains
the column title of each row of data. Currently all
such attempts result in the header being repeated
for each row (item in list).
Desired:
column1 column2 column3
data1a data1b data1c
data2a data2b data2c
Actual:
column1 column2 column3
data1a data1b data1c
column1 column2 column3
data2a data2b data2c
I have tried various combinations of header in its own "type"=>"Container"
all to no avail.
-
Megan Moss are you referencing the Dynamic Pivot Table Blox template? If so, it repeats Data1a for each Data1b entry in the above example. Have you modified it so it only shows: Data1a once in the first column?
-
Hi Sven!
We've encountered the same issue and managed to 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:Please feel free to reach out if you have any questions at: inquiries@paldi.solutions
Thanks, Lian
Paldi Solutions
Official Sisense Partner
Please sign in to leave a comment.
Comments
3 comments