dimbslmh / bootstrap-table-multiple-sort Goto Github PK
View Code? Open in Web Editor NEWSort by multiple columns. Extension for https://github.com/wenzhixin/bootstrap-table
License: MIT License
Sort by multiple columns. Extension for https://github.com/wenzhixin/bootstrap-table
License: MIT License
One of my column is date with mm-dd-yyyy.
But it sorts like number or character
Thank You
Plugin ignores <table data-buttons-class="primary">
setting. It always uses btn-default class for modal open button.
Forgive this if I'm missing something important, but I believe it would be better if showMultiSort was independent of sortPriority. As of now, if I use sortPriority and give it an order, showMultiSort appears to need to be true for the priority to work. If I say false or don't define showMultiSort in the table, the sortPriority has no effect.
Therefore, for my table, I'm having to override the multisort icon visibility in the Sass/CSS.
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){
....
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.