Uncaught ReferenceError: that is not defined at RowGroup._group

Uncaught ReferenceError: that is not defined at RowGroup._group

crackwoodcrackwood Posts: 2Questions: 1Answers: 0

Hi ! I seem to be getting an error when I try to group rows . Whenever I group rows that have a null value for the datascr, I get this error :

Uncaught ReferenceError: that is not defined
at RowGroup._group (datatables.js:86803)
at RowGroup._draw (datatables.js:86766)
at HTMLTableElement.<anonymous> (datatables.js:86713)
at HTMLTableElement.dispatch (jquery-3.3.1.js:5183)
at HTMLTableElement.elemData.handle (jquery-3.3.1.js:4991)
at Object.trigger (jquery-3.3.1.js:8249)
at Object.a.event.trigger (jquery-migrate-1.4.1.min.js:2)
at HTMLTableElement.<anonymous> (jquery-3.3.1.js:8327)
at Function.each (jquery-3.3.1.js:354)
at a.fn.init.each (jquery-3.3.1.js:189)

And the groups are not appearing. But when I go on a page that as no null value for the grouping column, the groups works,

Here is my code :

 var table = $("#accueil_ressources_commandes").DataTable({
      language: DATATABLE_FR,
      ajax: {
        async: true,
        url:
          url,
        dataSrc: ""
      },
      dom: "<'ui grid'" +
        "<'row'" +
        "<'col-lg-3'l>" +
        "<'center aligned col-lg-6'B>" +
        "<'right aligned four wide column'f>" +
        ">" +
        "<'row '" +
        "<''tr>" +
        ">" +
        "<'row'" +
        "<'col-lg-7'i>" +
        "<'right aligned nine wide column'p>" +
        ">" +
        ">",
      columns: [

        { data: "description", visible: false },
        { data: "otp" },
        { data: "commande" },
        { data: "lot" },
        { data: "description_lot", visible: false },
        { data: "statut_format" },

        { data: "debut_date" },
        { data: "fin_date" },
        { data: "responsable" },

      ],
      buttons: [
        { extend: 'pdf', className: 'btn-table btn-secondary' },
        { extend: 'excel', className: 'btn-table btn-secondary' },
          
      ],

      responsive: true,
      colReorder: false,
      // order: [[4, 'asc']],
      mark: true,
      select: {
        style: "single"
      },

      rowGroup: {
        dataSrc: "description",
        emptyDataGroup: null


      }
    });

Any help is greatly appreciated :)

Replies

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    Sorry - that's a bug in the current release. I'll roll out a new release to address that soon. its already been addressed in git though - you can grab the latest from here.

    Allan

  • chrisrbloomchrisrbloom Posts: 8Questions: 3Answers: 0

    I'm having a simliar problem with rowGroup:

    dataSrc: [0,1,2]

    returns error:
    that is not defined
    at h._group (datables.min.js:369)
    at h._group (datables.min.js:369)
    at h._group (datables.min.js:369)
    at h._draw (datables.min.js:368)

    tried nightly build, it didn't make a difference.

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

    Hi @chrisrbloom ,

    Have you tried it with the nightly releases that Allan pointed to in his last message?

    Cheers,

    Colin

  • GirlsAreSoftGirlsAreSoft Posts: 10Questions: 2Answers: 0

    I was able to get the nightly build of 1.1.1 to work. I also
    - used npm install for @types/datatables.net-rowgroup
    - manually added the datatables.rowgroup.js script to angular.json
    - manually updated package.json and package-lock.json to associate the 1.1.1 version number to the old 1.1.0 file location

    Not sure when 1.1.1 is going to be added to the npm repository but it seems the "nightly" build has had enough sleep to start doing work :smile:

This discussion has been closed.