drvic10k / bootstrap-sortable

adding sorting ability to bootstrap table
MIT License
513 stars 131 forks source link

Sort arrows should be customizable, both asc and desc #97

Open mxgit1090 opened 8 years ago

mxgit1090 commented 8 years ago

I am using the module to render the table. I use font-awesome as the arrow icons of the sort header. In the code, the default way to change the asc/desc icon is adding and removing the class "up" and "down" I am suggesting that the following current usage:

$.bootstrapSortable({
    sign: "fa fa-sort"
})

can be improved as the following:

$.bootstrapSortable({
    sign: {
        "asc":  "fa fa-sort-asc",
        "desc": "fa fa-sort-desc"
    }
});

On this way the arrows can be customized more easily Is it the good way to do so?

drvic10k commented 8 years ago

that would be possible, but please try this, if it works for you: https://astronautweb.co/snippet/font-awesome/

shrimpwagon commented 8 years ago

+1

Would also be nice to have an up/down arrow on all sortable columns to show users that the headers are clickable for sorting purposes.