Datatable is not working in mobile browsers

Datatable is not working in mobile browsers

NeerajvvNeerajvv Posts: 1Questions: 1Answers: 0
edited January 2020 in Free community support

Datatables are working perfectly fine in desktop browsers. When i load that in mobile browsers its not working.
I think its not getting initialised in mobile browsers.

code is as follows:

$('#listing-table').DataTable({
            ajax: {
                url  : '/api/orders',
                type : 'POST',
                data : {
                    access_token : window.settings.access_token
                },
                cache: false
            },
            columns: [
                { name: 'orders.order_number' },
                { name: 'orders.customer_phone' },
                { name: 'orders.customer_email' },
                { name: 'orders.total_order_amount' },
                { name: 'master_status.label' },
                { name: 'orders.created_at' },
                { name: 'orders.updated_at' },
                { name: 'user_created.fullname' },
            ],
            order: [[ 6, "desc" ]],
            columnDefs: [
                { "orderable": false, "targets": [8] },
                {
                    "targets": [3],
                    "className": 'text-right'
                }
            ]
        });

im loading :



Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    "Not working" is a big vague, it doesn't give us much to work with. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.