Add non-repeating header to list of items

Comments

3 comments

  • Avatar
    Megan Moss

    There is a template called BloxDynamicTable that does this. 

    0
    Comment actions Permalink
  • Avatar
    Tim Coppola

    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?

    1
    Comment actions Permalink
  • Avatar
    Lian Yagoda (Edited )

    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  

    www.paldi.solutions

     
    0
    Comment actions Permalink

Please sign in to leave a comment.