Cannot read property 'oFeatures' of undefined at Editor.. [as _tidy] (datata

Cannot read property 'oFeatures' of undefined at Editor.. [as _tidy] (datata

JhonatanxxJhonatanxx Posts: 1Questions: 1Answers: 0
edited June 2019 in Free community support

Al seleccionar los opciones del datable aparece el siguiente error:
core.js:15724 ERROR TypeError: Cannot read property 'oFeatures' of undefined
at Editor.<computed>.<computed> [as _tidy] (datatables.min.js:201)
at Editor.<computed>.<computed> [as create] (datatables.min.js:201)
at s.action (datatables.min.js:201)
at k (datatables.min.js:218)
at HTMLButtonElement.<anonymous> (datatables.min.js:219)

Código pila:

editor = new $.fn.dataTable.Editor({
          ajax: {
            url: "http://localhost:8080/PedidoDefault/mostrarPedidosDefault",
            headers: { 'Authorization': sessionStorage.getItem("_token") },
            method: 'POST'
          },
          table: "#dataTable",
          fields: [{
            label: "Sec",
            name: "sec"
          }, {
            label: "Clima",
            name: "idClima"
          }, {
            label: "Genero",
            name: "idGenero"
          }, {
            label: "Rol",
            name: "idRol"
          }, {
            label: "TallaPrenda",
            name: "idTallaPrenda"
          }, {
            label: "Campania",
            name: "idCampania"
          }
          ],
          formOptions: {
            inline: {
              onBlur: 'submit'
            }
          },
          i18n: {
            create: {
              button: "Nuevo",
              title: "Nuevo",
              submit: "Nuevo"
            },
            edit: {
              button: "Modificar",
              title: "Modificar",
              submit: "Modificar"
            },
            remove: {
              button: "Eliminar",
              title: "Eliminar",
              submit: "Eliminar",
              confirm: {
                _: "¿Está seguro de eliminar la fila seleccionada?",
                1: "¿Está seguro de eliminar la fila seleccionada?"
              }
            }
          }
        });

        this.loaderV = true;
        this.dtOptions = {
          columns: this.columnas,
          data: res,
          select: true,
          dom: 'Bfrtip',
          language: {
            "decimal": "",
            "emptyTable": "No hay información",
            "info": "Mostrando _START_ a _END_ de _TOTAL_ Entradas",
            "infoEmpty": "Mostrando 0 to 0 of 0 Entradas",
            "infoFiltered": "(Filtrado de _MAX_ total entradas)",
            "infoPostFix": "",
            "thousands": ",",
            "lengthMenu": "Mostrar _MENU_ Entradas",
            "loadingRecords": "Cargando...",
            "processing": "Procesando...",
            "search": "Buscar:",
            "zeroRecords": "Sin resultados encontrados",
            "paginate": {
              "first": "Primero",
              "last": "Ultimo",
              "next": "Siguiente",
              "previous": "Anterior"
            }
          },
          buttons: [
            { extend: 'create', editor: editor },
            { extend: 'edit', editor: editor },
            { extend: 'remove', editor: editor }
          ]
        };
        console.log(this.dtOptions);
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.DataTable(this.dtOptions);

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

Answers

This discussion has been closed.