Rebuild SearhPanes not filter rows properly

Rebuild SearhPanes not filter rows properly

didcomsergiodidcomsergio Posts: 15Questions: 4Answers: 0
when updating a render cell of the datatable the SearchPane updates properly but when filter activates it doesnt filter the row properly, example:

js code:
https://live.datatables.net/dedebixo/1/edit

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    Answer ✓

    Looks like this is the code you are asking about:

            case 1:
                ordenfabricacion[pos].progreso = progreso;
    
                labelprogreso = $('tr #progreso' + ordenfabricacionId); //esta linea hace que label tenga el valor del progreso en la tabla y la opcion del searchpanes
                labelprogreso.length > 1 ? labelprogreso[1].outerHTML = sethtmlprogreso(progreso, ordenfabricacionId) : labelprogreso[0].outerHTML = sethtmlprogreso(progreso, ordenfabricacionId);
                color(pos, progreso);
                datatable.searchPanes.rebuildPane();
                datatable = $('#myTable').DataTable();
                break;
    

    Looks like you are directly updating the table HTML. Datatables doesn't know about these changes. See this FAQ for the options to fix this issue.

    Kevin

Sign In or Register to comment.