Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

custom extension not showing properties

Hi all!

i'm working on a extension.

first of all if have defined the proprieties for that extension:

define([],function(){"use strict";        

     var measures={uses:"measures",min:2,max:2};

     var aminationOn = {        

          ref: "props.animazione.attiva",        

          label: "Attiva l'animazione",        

          type: "boolean",        

          expression: "optional"     },    

    

     animationTiming = {        

          ref: "props.animazione.tempo",        

          label: "Tempo di animazione",        

          type: "number",        

          expression: "optional"     };    

     var animationSection={        

          component: "expandable-items",

          label: "Animazione",        

          items: {            

               header1: {                

                    type: "items",                

                    label: "Animazione",                

                    items: {                    

                         aminationOn: aminationOn,                    

                         animationTiming: animationTiming                

                    }            

               }       

          }    

     };        

     return{        

          type:"items",        

          component:"accordion",        

          items:{            

               measures:measures,            

               animationSection: animationSection        

          }    

     }

});

ok, so when i drag and drop my extension in the document it ask me to add the two defined measure.

but later when i click on it the right panel doesn't came out, and i can't modify the proprieties.

i think that the problem is in the proprieties definition, but it seems correct to me.

have you ever found that issue? where i'm wrong?

thanks in advance,

Loris

1 Solution

Accepted Solutions
ErikWetterberg

I don't know if this is the problem, but try removing 'expression: "optional"'. I think that works only for string properties.

View solution in original post

6 Replies
ErikWetterberg

Not applicable
Author

i don't get any error in console,

the only thing i can see in the console is a log that print the layout object, as i have defined in the extension .js file.

so the extension works correctly, i can check in the log that the 2 measure defined during initializazion are calculated.

ErikWetterberg

I don't know if this is the problem, but try removing 'expression: "optional"'. I think that works only for string properties.

Not applicable
Author

ok it works!

thanks a lot!

ErikWetterberg

Not applicable
Author

yeah sure!

btw.. i found out that the properties definitions is the worst part in extensions developement.

maybe in my spare time i will develop a light app for compose that json, so i don't have to reinvent the wheel all the time..