Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to extend components?

I am wondering if its possible to change the ref attribute of measure component? I tried with this alteration

measures : {

  uses : "measures",

  min : 1,

  ref: "KFMeasuresList",

  },

But the add button is greyed out. Do I need to change something else or is it not possible this way?

I have implementet my own array and it works except for the expression popup when you add an item.

kfMeasureList:  {

    type: "array",

    translation: "Row measures",

    ref: "kfMeasureList",

    min: 1,

    allowAdd: true,

    allowRemove: true,

    allowMove: false,

    addTranslation: "Add row measure",

    grouped: true,

    sourceType: "kfMeasure",

    itemTitleRef: "label",

    items: {

        rowMeasure : {

            type : "string",

            expression : "always",

            expressionType : "measure",

            ref : "expression",

            label : "Measure",

            defaultValue : "",

            change : function(a,b) {

                    var c = a

                    if (c.label == '') {

                        c.label = c.qDef

                    };

                    return updateMeasures(a,b);

            }

        },

        rowLabel: {

            type: "string",

            ref: "label",

            label: "Label",

            show: true,

            defaultValue: ""

        }

...

Do I have to create my own component for this to make the popup appear?

Cheers

Karl

0 Replies