Q: Tabulator - lookup list ordering In tabulator I have defined a column as such:
{
    title:"Bonding", 
    editor:"select", 
    field:"bondingtype", 
    headerFilter:true, 
    width: 120, 
    formatter:'lookup',
    formatterParams: {"0":"Auto detect", "1":"ATOL", "6":"Flight Only", "2":"Non-Licensed", "3": "Not Bonded", "4":"Acting as agent", "5":"ABTA"}
    headerFilterParams: {"0":"Auto detect", "1":"ATOL", "6":"Flight Only", "2":"Non-Licensed", "3": "Not Bonded", "4":"Acting as agent", "5":"ABTA"}
}

All works fine BUT when the drop down filter is selected in the headerfilter, the entries have been sorted in to numeric order 1-6 rather than the order as they are defined in the list.
Is there a way that I can control the sort order to be the order as defined in the array passed in?

A: I don't have time at the moment to set up an example to test, but I would start by changing this:
headerFilterParams: {"0":"Auto detect", "1":"ATOL", "6":"Flight Only", "2":"Non-Licensed", "3": "Not Bonded", "4":"Acting as agent", "5":"ABTA"}```

to this:
headerFilterParams: {values: {"0":"Auto detect", "1":"ATOL", "6":"Flight Only", "2":"Non-Licensed", "3": "Not Bonded", "4":"Acting as agent", "5":"ABTA"}}


A: This happens because of the way that JavaScript handles object properties, it dosnt matter the order you define them, JavaScript will always order them alphanumerically when iterating over them.
To get round this you could use the complex array option for passing in the values list:
headerFilterParams:{
    values:[
        {
            label:"0",
            value:"Auto detect",
        },
        {
            label:"1",
            value:"ATOL",
        },
        {
            label:"6",
            value:"Flight Only",
        },
        //and so on...
    ]
}

