to your account
when i try to set the data of tabluator table with ajax response i get this error:
Uncaught (in promise) TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
at Group.generateGroupHeaderContents (tabulator.js:13615)
at Group.getElement (tabulator.js:13638)
at RowManager.styleRow (tabulator.js:3854)
at RowManager._virtualRenderFill (tabulator.js:3928)
at RowManager.renderTable (tabulator.js:3728)
at RowManager.refreshActiveData (tabulator.js:3537)
at RowManager._setDataActual (tabulator.js:2727)
at tabulator.js:2680
at new Promise (<anonymous>)
at RowManager.setData (tabulator.js:2662)
The result from ajax is in the correct format.
I'm using the last release.
How i can hande it?
Thank you
Hey @dasio86
Thanks for getting in touch, sorry to hear you are having issues.
That looks like an invalid value may be being returned from the groupHeader callback in your constructor object.
Could you post a copy of your table constructor so we can see how your table is setup and offer advice on how to resolve it.
Cheers
Oli :)
Hi @olifolkerd belowe the code:
The function carica_dati_installazione() call an ajax that load the data. I must use this workaround cause if i use the embedded ajax it return a cors error
window.tabella_installazioni = new Tabulator("#tabella_installazioni", {
layout:"fitColumns",
height:$(window).height()-50+"px",
groupBy:'stato_installazione',
groupToggleElement:"header",
groupHeader:function(value, count, data, group){
switch(value){
case 1: return "Da Prendere in carico (" + count + " Installazioni)";
break;
case 2: return "Prese in carico da programmare (" + count + " Installazioni)";
break;
case 3: return "Programmate (" + count + " Installazioni)";
break;
case 4: return "Da Chiudere (" + count + " Installazioni)";
break;
case 5: return "Chiuse (" + count + " Installazioni)";
break;
columns:[
{title:"",field:"stato_installazione",visible:false},
{title:"ID Flusso",width:100, field:"id_flusso",headerFilter:"input", headerFilterPlaceholder:"Id Flusso" },
{title:"Lavoro Installazione",width:200, field:"lavoro" },
{title:"Ordine Installazione",width:200, field:"ordine_installazione"},
{title:"Cliente", field:"cliente", align:"center"},
{title:"Descrizione", field:"descrizione", formatter:"textarea"},
rowContext:function(e, row){
//e - the click event object
//row - row component
window.dati_riga_installazione=row.getData();
$('.data-title').attr('data-menutitle', "ID Flusso: "+window.dati_riga_installazione.id_flusso);
tableBuilt:function(){
//carica_dati_installazione();
carica_dati_installazione()