<commit_before>var columnDefs = [
    {
        headerName: "A",
        field: "author",
        width: 300,
        colSpan: function(params) {
            return params.data === 2 ? 3 : 1
        }
    },
    {
        headerName: "Flexed Columns",
        children: [
            {
                headerName: "B",
                minWidth: 200,
                maxWidth: 350,
                flex: 2
            },
            {
                headerName: "C",
                flex: 1
            }
        ]
    }
];

var gridOptions = {
    defaultColDef: {
        resizable: true,
        cellRenderer: ShowWidthCellRenderer
    },
    columnDefs: columnDefs,
    rowData: [1, 2]
};

function ShowWidthCellRenderer() {}

ShowWidthCellRenderer.prototype.init = function(params) {
    this.eGui = document.createElement("div");
    this.isTotalWidthRow = params.data === 2;
    this.interval = setInterval(this.refresh.bind(this), 50);
    this.refresh();
};

ShowWidthCellRenderer.prototype.refresh = function() {
    if (this.eGui.parentElement) {
        const width = this.eGui.parentElement.offsetWidth;
        this.eGui.textContent = width + "px";
        if (this.isTotalWidthRow) {
            this.eGui.textContent =  "Total width: " + this.eGui.textContent;
        }
    }
};

ShowWidthCellRenderer.prototype.getGui = function() {
    return this.eGui;
};

ShowWidthCellRenderer.prototype.destroy = function() {
    clearInterval(this.interval);
};

// setup the grid after the page has finished loading
document.addEventListener("DOMContentLoaded", function() {
    var gridDiv = document.querySelector("#myGrid");
    new agGrid.Grid(gridDiv, gridOptions);
});
<commit_msg>AG-2566 - fixed flex example ie IE11<commit_after>var columnDefs = [
    {
        headerName: "A",
        field: "author",
        width: 300,
        colSpan: function(params) {
            return params.data === 2 ? 3 : 1
        }
    },
    {
        headerName: "Flexed Columns",
        children: [
            {
                headerName: "B",
                minWidth: 200,
                maxWidth: 350,
                flex: 2
            },
            {
                headerName: "C",
                flex: 1
            }
        ]
    }
];

var gridOptions = {
    defaultColDef: {
        resizable: true,
        cellRenderer: ShowWidthCellRenderer
    },
    columnDefs: columnDefs,
    rowData: [1, 2]
};

function ShowWidthCellRenderer() {}

ShowWidthCellRenderer.prototype.init = function(params) {
    this.eGui = document.createElement("div");
    this.isTotalWidthRow = params.data === 2;
    this.interval = setInterval(this.refresh.bind(this), 50);
    this.refresh();
};

ShowWidthCellRenderer.prototype.refresh = function() {
    if (this.eGui.parentElement) {
        var width = this.eGui.parentElement.offsetWidth;
        this.eGui.textContent = width + "px";
        if (this.isTotalWidthRow) {
            this.eGui.textContent =  "Total width: " + this.eGui.textContent;
        }
    }
};

ShowWidthCellRenderer.prototype.getGui = function() {
    return this.eGui;
};

ShowWidthCellRenderer.prototype.destroy = function() {
    clearInterval(this.interval);
};

// setup the grid after the page has finished loading
document.addEventListener("DOMContentLoaded", function() {
    var gridDiv = document.querySelector("#myGrid");
    new agGrid.Grid(gridDiv, gridOptions);
});

{'fraction_non_alphanumeric': 0.12137203166226913, 'fraction_numerical': 0.01289944297859865, 'mean_word_length': 2.0990009082652135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4825289', 'n_tokens_mistral': 1038, 'n_tokens_neox': 986, 'n_words': 197}