1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-16 23:55:46 +01:00

Improved sort column types handling

This commit is contained in:
Max Guglielmi 2016-09-25 23:44:41 +10:00
commit e276729f1d
10 changed files with 15 additions and 11 deletions

View file

@ -416,6 +416,10 @@ export default class AdapterSortableTable extends Feature {
if (colType === DATE) {
colType = this._addDateType(i, sortTypes);
}
else if (colType === FORMATTED_NUMBER ||
colType === NUMBER) {
colType = this._addNumberType(i, tf.decimalSeparator);
}
else if (colType === NONE) {
// TODO: normalise 'none' vs 'None'
colType = 'None';
@ -430,7 +434,6 @@ export default class AdapterSortableTable extends Feature {
//Public TF method to add sort type
//Custom sort types
this.addSortType(NUMBER, Number);
this.addSortType('caseinsensitivestring', SortableTable.toUpperCase);
this.addSortType(STRING);
this.addSortType(IP_ADDRESS, ipAddress, sortIP);