TypeError: right-hand side of 'in' should be an object, got number

TypeError: right-hand side of 'in' should be an object, got number

raphael75raphael75 Posts: 3Questions: 2Answers: 0
edited November 2019 in Free community support

I get this error:

TypeError: right-hand side of 'in' should be an object, got number

I am using datatables 1.10.16 and jquery 3.2.1. This is the call:

mytable = $('#mytable').dataTable({
                    buttons:    ['copy', 'excel', 'pdf', 'colvis'],
                    autoWidth:  false,
                    columns:    [
                                    null,
                                    null,
                                    { /* Actions */ 
                                        bSortable:      false,
                                        bSearchable:    false 
                                    }
                                ],
                    JQueryUI:   true,
                    language:   { 
                                    zeroRecords: 'No Data To Display.'
                                },
                    pagingType: 'full_numbers',
                    lengthMenu: [50, 100, 150],
                    pageLength: 50
                });

What could cause this error?

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @raphael75 ,

    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.