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

Nested item array components in properties panel

Hi all,

I am currently working on a custom extension where we are trying to set up conditional color formatting for measures similarly to how it works in the Qlik KPI extension. Since we do not have access to the "Color-Scale-Creator" component I am attempting to remake the  functionality using an items array in the properties panel.

I was able to get everything functioning properly, however we are coming across a few errors that I believe are stemming from the way we have our properties panel written.

data: {
uses: "data",
items: {
measures: {
  min: 1,
  max: 15,
  disabledRef: "",
  items: {
    useConditionalColoring: {
      type: "boolean",
      component: "switch",
      label: "Conditional colors",
      ref: "qDef.colors.useConditionalColoring",
      options: [{
        value: true,
        label: "On"
       }, {
        value: false,
        label: "Off"
      }],
      defaultValue: false
    },
    conditionalLimits: { // only conditional colors switch on
      type: "array",
      ref: "qDef.conditionalColoring",
      label: "Limits",
      itemTitleRef: "gradient.limit",
      allowAdd: true,
      allowRemove: true,
      addTranslation: "Add limit",
      min: 0,
      max: 5,
      show: function show(data) {
        return data.qDef.colors.useConditionalColoring === true;
      },
      items: {
        limit: {
          label: 'Limit',
          type: 'string',
          ref: 'gradient.limit',
          expression: 'optional',
          defaultValue: "50"
        },
 ....... //more inputs go here
      }
    }
  }
}}}
 
The issues:
1. The functionality to drag and drop charts and select "convert to" is not working for the new extension.
2. The "Conditional limits" items array is not able to be reordered after they add the items.
3. When you right click on one of the conditional limit items you created the following error is logged.
BenjaminGroff_0-1646245139984.png

 

I am curious if the issue is because I am nesting an items array within the reusable measures component? But I could use some help on coming up with a solution! Any help or suggestions would be greatly appreciated!

 
Labels (3)
1 Solution

Accepted Solutions
BenjaminGroff
Contributor III
Contributor III
Author

This issue was fixed when upgrading to February 2022 release from February 2021. Not exactly sure what it was, but it works now.

View solution in original post

1 Reply
BenjaminGroff
Contributor III
Contributor III
Author

This issue was fixed when upgrading to February 2022 release from February 2021. Not exactly sure what it was, but it works now.