Forum Discussion
Anonymous
3 years agoNot applicable
How to add toggle in format pane dynamically
Hi, I'm developing a custom visual, where I want to show multiple toggle in formatpane based on user input(data field),
ie; if data field have one colum only one toggle should be shown, if another column is addeed new toggle will added for that.
I'm able to partially achive this by modifying enumerateObjectInstances() function
for (let i = 0; i < 5; i++) {
objectEnumeration.push({
objectName: objectName,
displayName: "sample"+i,
selector: null,
properties: {
firstProp: this.settings.myObj.firstProp,
},
});
}
which give something like this
the problem is, if I change the first toggle the rest of toggle also chaning, I'm not sure how a I should save it to settings.
1 Reply
- AnonymousNot applicable
Hi Anonymous
Can you provide your pbix file(remove sensitive info) for me to test your problem ?
Best Regards,
Community Support Team _ Ailsa Tao