victorette / jquery-datatables-row-grouping

Automatically exported from code.google.com/p/jquery-datatables-row-grouping
0 stars 0 forks source link

Huge css classes generated when group column contains HTML #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using this plugin (version 1.2.9.) in a project and it works perfectly, but 
I found a problem when grouping row contains complex HTML.

The grouping table column contain some text and links (it can seems weird but 
there's an explanation for this need!).
Suddenly the table became very slow and I found that the problem is the 
automatically generated css class that not only contains cell text, but the 
whole sanitized HTML.

I fixed the problem changing the code of the *_fnGetCleanedGroup* function:

    ...
    sGroup = $.trim($('<div>' + sGroup + '</div>').text());
    return sGroup.toLowerCase().replace(/[^a-zA-Z0-9\u0080-\uFFFF]+/g, "-");

I'm not sure if this fix can behave side effects, but I think that something 
can be done for fixing this kind of issues.

Apart this problem: great plugin!

Original issue reported on code.google.com by luca...@gmail.com on 12 Jan 2014 at 8:52

GoogleCodeExporter commented 8 years ago
Same issue here! I think there should be a setting for this to swith 
css-class-generation on/off.

Original comment by m.bartol...@gmail.com on 4 Feb 2014 at 1:08