Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Intl.Collator Compare is dead slow in IE #321

Closed
KannanThayumanavan opened this issue Oct 30, 2018 · 1 comment
Closed

Intl.Collator Compare is dead slow in IE #321

KannanThayumanavan opened this issue Oct 30, 2018 · 1 comment

Comments

@KannanThayumanavan
Copy link

Below is my sample code, I have more than 7k records in my table, below code executes when I click on table header to sort columns,

var collator = new Intl.Collator(undefined, {
numeric: true,
sensitivity: 'base'
});
var objs = [{name: '1_Document', size: 40}, {name: '11_Document', size: 50}, {name: '2_Document', size: 60}];

objs.sort(function(a, b) { return collator.compare(a.name, b.name) })

But it is dead slow in IE and "Stop Script" message pops-up. Can someone please help?

@okuryu
Copy link
Contributor

okuryu commented Oct 30, 2018

Intl.js doesn’t provides Intl.Collator.
https://github.com/andyearnshaw/Intl.js/blob/master/README.md#what-about-intlcollator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants