JS Tabulator Headerfilter Initial on dynamic params not working

Viewed 10

I have a tabulator with a header filter which I create with dynamic values as they need to be localized.

{
                title: "Active",
                field: "active",
                sorter: "integer",
                formatter: function (cell, formatterParams, onRendered)
                {
                    if (parseInt(cell.getValue()) === 1)
                        return getLocalStringIfExists("default.yes");
                    return getLocalStringIfExists("default.no");
                },
                headerFilter: 'select',
                headerFilterParams: {
                    values: [getLocalStringIfExists("default.all"),
                                getLocalStringIfExists("default.yes"),
                                getLocalStringIfExists("default.no")],
                    initial: getLocalStringIfExists("default.no")
                },
                headerFilterFunc: function(headerValue, rowValue)
                {
                    if(parseInt(rowValue) === 1)
                    {
                        return headerValue === getLocalStringIfExists("default.yes")
                                || headerValue === getLocalStringIfExists("default.all");
                    }
                    return headerValue === getLocalStringIfExists("default.no")
                        || headerValue === getLocalStringIfExists("default.all");
                }

but it is not setting the select to "No" on creation.

What am I missing?

0 Answers
Related