We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I have panel properties with selector : ISelectionId.getSelector()
in my table view i bind event click to define with row is selected by user and show some properties in panel properties using enumerateObjectInstances, the problem are when panel properties active/show and user click some row in table view because enumerateObjectInstances not called by power bi.
it any way to call enumeration by code? i need to refresh panel properties depend row selected
Solved! Go to Solution.
solve this case use persist object
public syncSelection(ids: ISelectionId[], row: number, col: number, selector: Selector) {
if (row == null) return;
let enumerationObject: powerbi.VisualObjectInstanceEnumerationObject = {
containers: [],
instances: [],
};
let persistProperties : VisualObjectInstancesToPersist;
if(row == -1){ // remove from format panel
this.settingDataPoint(enumerationObject, "dataPoint");
persistProperties = {
remove: enumerationObject.instances
}
}
this.selected.row = row;
this.selected.col = col;
this.selected.selected = ids[0];
this.selected.selectionId = ids;
this.selected.selector = selector;
if(row != -1) {
this.settingDataPoint(enumerationObject, "dataPoint");
persistProperties = {
replace : enumerationObject.instances
}
}
// console.log('ini coba persist', persistProperties);
this.host.persistProperties(persistProperties);
}but I still don't understand remove and removeObject how to use it, to confused
it is imposible to update format panel when user click some row in our view?
I try using this.host.refreshHostData(); this solve my problem when developing,
but this not working when we use pbiviz package because enumerateObjectInstances never called
solve this case use persist object
public syncSelection(ids: ISelectionId[], row: number, col: number, selector: Selector) {
if (row == null) return;
let enumerationObject: powerbi.VisualObjectInstanceEnumerationObject = {
containers: [],
instances: [],
};
let persistProperties : VisualObjectInstancesToPersist;
if(row == -1){ // remove from format panel
this.settingDataPoint(enumerationObject, "dataPoint");
persistProperties = {
remove: enumerationObject.instances
}
}
this.selected.row = row;
this.selected.col = col;
this.selected.selected = ids[0];
this.selected.selectionId = ids;
this.selected.selector = selector;
if(row != -1) {
this.settingDataPoint(enumerationObject, "dataPoint");
persistProperties = {
replace : enumerationObject.instances
}
}
// console.log('ini coba persist', persistProperties);
this.host.persistProperties(persistProperties);
}but I still don't understand remove and removeObject how to use it, to confused
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |