olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.76k stars 821 forks source link

Can not set columnDefaults for headerTooltip #4616

Open KES777 opened 2 weeks ago

KES777 commented 2 weeks ago

Describe the issue

let opts =  Tabulator.defaultOptions;
opts.columnDefaults = {
  headerTooltip: true
};
...
var table = new Tabulator("#original-table", {
    columnDefaults:{
        tooltip:true, 
    },
    columns:[    
        { width: 50, tooltip: "xxx", headerTooltip: "yyy" },
    ]
})

Tabulator Info 6.3

Working Example When this code is run then here:

initialize(){
        this.langList = Helpers.deepClone(Localize.langs);

        if(this.table.options.columnDefaults.headerFilterPlaceholder !== false){
            this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);
        }

at this.table.options.columnDefaults we will see { tooltip: true } instead of expected { tooltip: true, headerTooltip: true }.

Probably this is not the issue, but it would be nice if deep default options will be merged, instead of replaced.