Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

237
Visualizações
DataTable update to 1.11 destroy returning error

My app is running fine on version 1.10.24 and 1.10.25.

Recently I am trying to update packages and moved to 1.11.3 and I am starting to get error.

My code is fairly simple. But logic; is that I have a Start Process button, when that is pressed certain data is processed on server and response comes via web-socket which is added to table using table.add(), this works fine first time. But user can press the button again to reprocess the data on server. For this, I am clearing the table.

for

$('#testGrid').DataTable().destroy();

I am getting following error

dataTables.colResize.js:262 Uncaught TypeError: Cannot read properties of null (reading 'dt')
    at ColResize._fnStateSave (dataTables.colResize.js:262)
    at jQuery.fn.init.<anonymous> (dataTables.colResize.js:249)
    at jquery.dataTables.js:6754
    at Function.map (jquery.js:467)
    at _fnCallbackFire (jquery.dataTables.js:6753)
    at _fnSaveState (jquery.dataTables.js:6405)
    at _Api.<anonymous> (jquery.dataTables.js:8815)
    at _Api.iterator (jquery.dataTables.js:7145)
    at _Api.<anonymous> (jquery.dataTables.js:8804)
    at _Api.visible (jquery.dataTables.js:7312)

for

let testGrid = $('#testGrid').DataTable();
testGrid.clear().draw();

There is no error, and after pressing process button, an error is thrown as soon I try to add data

Uncaught TypeError: Cannot set properties of undefined (setting '_aData')
    at _Api.<anonymous> (jquery.dataTables.js:8278)
    at _Api.data (jquery.dataTables.js:7312)
    at results-timeline-grid.js:254
    at arrayEach (_arrayEach.js:16)
    at Function.forEach (forEach.js:43)
    at Class.updateDataSource (results-timeline-grid.js:235)
    at Class.onDataUpdated (data-grid.js:31)
    at sendEvent (index.js:219)
    at Class.trigger (evented.js:113)
    at Class.publish (event-bus.js:11)

As stated before, my code is working fine on 1.10.24, 1.10.25

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I was using other plugins as well, which were not updated. After updating those plugins it is resolved

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda