protected persistNodeSelection()

in packages/network-navigator-powerbi/src/NetworkNavigatorVisual.ts [212:225]


    protected persistNodeSelection(node: INetworkNavigatorSelectableNode) {
        const filterToApply = node && node.filter;
        let hasConditions = false;
        if (filterToApply && filterToApply["values"]) {
          hasConditions = filterToApply["values"].length > 0;
        } else if (filterToApply && filterToApply["conditions"]) {
          hasConditions = filterToApply["conditions"].length > 0;
        }
        const action = hasConditions
          ? powerbi.FilterAction.merge
          : powerbi.FilterAction.remove;

        this.host.applyJsonFilter(filterToApply, "general", "filter", action);
    }