Fix: Expose `ext.order.intl` again (was renamed to DataTable.intlOrder)

https://datatables.net/forums/discussion/75770
pull/389/merge
Allan Jardine 2 years ago
parent c3315b02ce
commit 323a3b0b01

@ -92,6 +92,8 @@ DataTable.intlOrder = function (locales, options) {
};
}
};
// Old style originally introduced in the blog post
DataTable.ext.order.intl = DataTable.intlOrder;
return DataTable;

@ -1,2 +1,2 @@
/*! © SpryMedia Ltd - datatables.net/license */
!function(t){var r,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(r=require("jquery"),o=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||r(e),o(e,n),t(n,e,e.document)}:(o(window,r),module.exports=t(r,window,window.document))):t(jQuery,window,document)}(function(e,r,n,t){"use strict";var o=e.fn.dataTable;return o.intlOrder=function(e,n){var t;r.Intl&&(t=new Intl.Collator(e,n),delete(e=o.ext.type).order["string-pre"],e.order["string-asc"]=t.compare,e.order["string-desc"]=function(e,n){return-1*t.compare(e,n)})},o});
!function(t){var r,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(r=require("jquery"),o=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||r(e),o(e,n),t(n,e,e.document)}:(o(window,r),module.exports=t(r,window,window.document))):t(jQuery,window,document)}(function(e,r,n,t){"use strict";var o=e.fn.dataTable;return o.intlOrder=function(e,n){var t;r.Intl&&(t=new Intl.Collator(e,n),delete(e=o.ext.type).order["string-pre"],e.order["string-asc"]=t.compare,e.order["string-desc"]=function(e,n){return-1*t.compare(e,n)})},o.ext.order.intl=o.intlOrder,o});

@ -1,2 +1,2 @@
/*! © SpryMedia Ltd - datatables.net/license */
import $ from"jquery";import DataTable from"datatables.net";DataTable.intlOrder=function(e,r){var t;window.Intl&&(t=new Intl.Collator(e,r),delete(e=DataTable.ext.type).order["string-pre"],e.order["string-asc"]=t.compare,e.order["string-desc"]=function(e,r){return-1*t.compare(e,r)})};export default DataTable;
import $ from"jquery";import DataTable from"datatables.net";DataTable.intlOrder=function(e,t){var r;window.Intl&&(r=new Intl.Collator(e,t),delete(e=DataTable.ext.type).order["string-pre"],e.order["string-asc"]=r.compare,e.order["string-desc"]=function(e,t){return-1*r.compare(e,t)})},DataTable.ext.order.intl=DataTable.intlOrder;export default DataTable;

@ -49,6 +49,8 @@ DataTable.intlOrder = function (locales, options) {
};
}
};
// Old style originally introduced in the blog post
DataTable.ext.order.intl = DataTable.intlOrder;
export default DataTable;

@ -56,3 +56,6 @@ DataTable.intlOrder = function (locales, options) {
};
}
};
// Old style originally introduced in the blog post
(DataTable.ext.order as any).intl = DataTable.intlOrder;

Loading…
Cancel
Save