1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
436 stars 177 forks source link

Question: Is it possible to customize or override the logic for determining the values for sorting #254

Open scottjungers opened 7 years ago

scottjungers commented 7 years ago

Beyond setting the data-path attribute, I am having trouble finding how I can customize how the sort determines the values on the path.

I'm working on an application where decimal values are rounded for display, but still need to be sorted by the raw-decimal values. Right now we show the raw value as a tool tip which pulls the raw score from the title attribute on the same element that has the selector (by css class name) for sorting. In order to get sorting correct we have to create a hidden element with the raw value. Ideally, I could customize the logic so that it pulls from the title attribute instead of $(elem).text() or $(elem).html().