Possibility to 'exclude' value in pivottable

Hello,

I was wondering if there is a way to programmatically 'exclude' a value in a pivottable? At the moment, you can only explicitly 'include' a value, or multiple, with the multiselect, but not exclude.

Obviously I could include all values except the one I want to exclude, but I would hope there is a cleaner way to do that?

Comments

  • edited May 5

    Hello @joelhoro ,
    You can create a custom filter, which will exclude the values ​​selected in it from the datatable:

    webix.protoUI({
      name: "excl-combo",
      $cssName: "combo",
      $init: function(config) {
        config.on = {
          onChange:function(newv){
            if (this.getTopParentView() && this.getTopParentView().config.view === "pivot") {
              this.getTopParentView().$$("data").filter(function(obj){
                return obj.name !== newv; 
              });
            }
          } 
        }
      }
    }, webix.ui.combo);
    
    ...
    
    $$("pivot").filters.add("excl-combo", true);
    

    Please check the next snippet:
    https://snippet.webix.com/0elx8shc

  • Thanks so much!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!