Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82458

Speed up Search Panes by providing the pre parsed JS

$
0
0

Not sure how to word this.

I have a datatable that has in it 13,763 entries with one field that has in a it values split by comma which I am using orthogonal for.

columns: [
        {
            className: 'details-control',
            orderable: false,
            data: 0,
            defaultContent: '',
            render() {
                return '<i class="fa fa-plus-square" aria-hidden="true"></i>';
            },
            width: '5%',
        },
        {
            data: null,
            render(data) {
                const schoolCount = data.School.split('; ').length;
                return `${data.Report} (${schoolCount})`;
            },
            title: 'Report',
            width: '50%',
        },
        {
            data: null,
            render(data) {
                const schoolCount = data.School.split('; ').length;
                return schoolCount;
            },
            title: 'Count',
            width: '5%',
        },
        {
            data: 'File',
            title: 'File',
            width: '50%',
        },
        {
            data: null,
            render(data) {
                const schoolCount = data.School.split('; '); // This in total is over 70,000
                return schoolCount;
            },
            searchPanes: {
                orthogonal: 'schoolCount'  
            },
            visible: false,
            searchable: false,
            title: 'School',
        },
]

However that array all together is over 70,000 records.

This is causing the site to take over 5 extra seconds to load, is there a way for me to provide to search panes a pre parsed js file with the options it needs to load?

Let me know if you need more info, I can give access to the repository if needed to test.


Viewing all articles
Browse latest Browse all 82458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>