1

I am using footable to display a huge table. I am displaying the columns in json:

"columns": $.get("/masteradmin/full-report-columns/", postdata_columns, 'json'),

I want to sort the month columns by default. How I can set a data-sort-initial="descending" variable in the json?

{
    "name": "month",
    "title": str(_("Month")),
    "type": "date",
    "formatString": "MMMM YYYY"
},

Thanks

adrien
  • 126
  • 1
  • 14

1 Answers1

1

The examples show how to achieve this: http://fooplugins.github.io/FooTable/docs/components/sorting.html#options

{
    "name": "month",
    "title": str(_("Month")),
    "type": "date",
    "formatString": "MMMM YYYY",
    "sorted": true,
    "direction": "DESC"
},
BlueWater86
  • 1,773
  • 12
  • 22