Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.
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
I don't know if this is the problem, but try removing 'expression: "optional"'. I think that works only for string properties.
Do you get any errors in the console?
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.
I don't know if this is the problem, but try removing 'expression: "optional"'. I think that works only for string properties.
ok it works!
thanks a lot!
Good!
You might also add a defaultValue.
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..