onBeforeApply

fires on the "Apply" button click

void onBeforeApply(object selected_structure){ ... };

Parameters

selected_structureobjectthe structure object with chosen "filters", "rows", "columns" and "values"

Example

// specifying header sorting before applying the selected structure
webix.ui({
    view: "pivot",
    on:{
        onBeforeApply: function(structure){
            var columns = structure.columns;
            // apply header sorting
            for(var i =0; i < columns.length; i++){
                if(typeof cols[i] == "string"){
                    cols[i] = {id: cols[i], sort: "string"};
                }
                else
                    cols[i].sort = "string";
            }
        }
    }
});

Details

Returning false within the handler will prevent the execution of further logic and the action will not be applied.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix widget library and page of pivot table web product.