Fix: Enum plug-in error

pull/567/head
Allan Jardine 1 year ago
parent e405113d46
commit d2b32a16eb

@ -79,7 +79,7 @@ DataTable['enum'] = function (arr) {
return lookup[d] !== undefined ? name : null; return lookup[d] !== undefined ? name : null;
}); });
// Add sorting method // Add sorting method
types.type.order[name + '-pre'] = function (d) { types.order[name + '-pre'] = function (d) {
return lookup[d]; return lookup[d];
}; };
}; };

@ -1,2 +1,2 @@
/*! © SpryMedia Ltd - datatables.net/license */ /*! © SpryMedia Ltd - datatables.net/license */
!function(t){var o,u;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(o=require("jquery"),u=function(e,n){n.fn.dataTable||require("datatables.net")(e,n)},"undefined"==typeof window?module.exports=function(e,n){return e=e||window,n=n||o(e),u(e,n),t(n,e,e.document)}:(u(window,o),module.exports=t(o,window,window.document))):t(jQuery,window,document)}(function(e,r,n,d){"use strict";var e=e.fn.dataTable,i=0,f=e.ext.type;return e.enum=function(e){for(var n="enum-"+i++,t=r.Map?new Map:{},o=0,u=e.length;o<u;o++)t[e[o]]=o;f.detect.unshift(function(e){return t[e]!==d?n:null}),f.type.order[n+"-pre"]=function(e){return t[e]}},e}); !function(t){var o,u;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(o=require("jquery"),u=function(e,n){n.fn.dataTable||require("datatables.net")(e,n)},"undefined"==typeof window?module.exports=function(e,n){return e=e||window,n=n||o(e),u(e,n),t(n,e,e.document)}:(u(window,o),module.exports=t(o,window,window.document))):t(jQuery,window,document)}(function(e,r,n,d){"use strict";var e=e.fn.dataTable,i=0,f=e.ext.type;return e.enum=function(e){for(var n="enum-"+i++,t=r.Map?new Map:{},o=0,u=e.length;o<u;o++)t[e[o]]=o;f.detect.unshift(function(e){return t[e]!==d?n:null}),f.order[n+"-pre"]=function(e){return t[e]}},e});

@ -1,2 +1,2 @@
/*! © SpryMedia Ltd - datatables.net/license */ /*! © SpryMedia Ltd - datatables.net/license */
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;var unique=0,types=DataTable.ext.type;DataTable.enum=function(e){for(var t="enum-"+unique++,a=window.Map?new Map:{},n=0,r=e.length;n<r;n++)a[e[n]]=n;types.detect.unshift(function(e){return void 0!==a[e]?t:null}),types.type.order[t+"-pre"]=function(e){return a[e]}};export default DataTable; import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;var unique=0,types=DataTable.ext.type;DataTable.enum=function(e){for(var t="enum-"+unique++,a=window.Map?new Map:{},n=0,r=e.length;n<r;n++)a[e[n]]=n;types.detect.unshift(function(e){return void 0!==a[e]?t:null}),types.order[t+"-pre"]=function(e){return a[e]}};export default DataTable;

@ -39,7 +39,7 @@ DataTable['enum'] = function (arr) {
return lookup[d] !== undefined ? name : null; return lookup[d] !== undefined ? name : null;
}); });
// Add sorting method // Add sorting method
types.type.order[name + '-pre'] = function (d) { types.order[name + '-pre'] = function (d) {
return lookup[d]; return lookup[d];
}; };
}; };

@ -47,7 +47,7 @@ DataTable['enum'] = function (arr) {
}); });
// Add sorting method // Add sorting method
types.type.order[name + '-pre'] = function (d) { types.order[name + '-pre'] = function (d) {
return lookup[d]; return lookup[d];
}; };
}; };

Loading…
Cancel
Save