Skip to content

The multiple-sort plugin doesn't take into consideration if column has a "sorter" property defined (which defines the function for sorting). #1

Open
@danieltutuianu

Description

@danieltutuianu

var sortOrder = [{"sortName": "day_of_week","sortOrder":"asc"},{"sortName":"start_time","sortOrder":"asc"}];

$el.bootstrapTable({
columns: columns
,data: data
, sortPriority:sortOrder
, showMultiSort:true
});

where

columns.push({
field: 'day_of_week',
title: tableColumnsLabels["day_of_week"],
sortable: true,
sorter:"sortDays",
editable: false,
align: 'center',
width:'80'
});
columns.push({
field: 'start_time',
title: tableColumnsLabels["start_time"],
sortable: true,
sorter:"sortTime",
align: 'center'
});

function sortDays(a,b){
....
}

function sortTime(a,b){
....
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions