displayStyle: "compact", //or "all": all on same page
parameters: 0, //TODO: DO NOT re-draw parameters for already answered questions
};
- }
+ },
// Full questions tree is rendered, but some parts hidden depending on display settings
render(h) {
// Prepare questions groups, ordered
const dotPos = q.index.indexOf(".");
return dotPos === -1 ? q.index : q.index.substring(0,dotPos);
});
- let domTree = questionGroups.map( (qg,i) => {
+ let domTree = Object.keys(questionGroups).map( idx => {
+ let qg = questionGroups[idx];
+ const i = parseInt(idx);
// Re-order questions 1.1.1 then 1.1.2 then...
const orderedQg = qg.sort( (a,b) => {
let aParts = a.split('.').map(Number);
{
"class": {
"question": true,
- "depth" + depth: true,
+ ["depth" + depth]: true,
},
},
questionContent
"questionGroup": true,
"hide": this.display == "one" && this.iidx != i,
},
- }
+ },
qgDom
);
});