Datatable with ReactJS

Datatable with ReactJS

livliv Posts: 2Questions: 1Answers: 0

Like to know about using JQuery dataTable in ReactJS. I tried a simple page which will list number of users in a table format using dataTable. While deleting a record in the table Am facing the issue of reinitialisation of datatable. So Am destroying the whole datatable object and creating it again, which Am not happy with. Is there any other solution to resolve this issue.

Thanks in advance

Answers

  • livliv Posts: 2Questions: 1Answers: 0
    edited December 2015

    I tried with fnClearTable option in the object am getting the error

    Error: Invariant Violation: processUpdates(): Unable to find child 1 of element. This 
    probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due 
    to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using 
    non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element 
    with React ID `.0.2.1.1`.
        
    error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () {
    

    Any thoughts?

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Both DataTables and React are trying to control the DOM so inevitably there will be a conflict there. Currently there is not a solution to use both together for the same table as far as I am aware. There are a few other discussions on this topic if you use the search.

    Allan

This discussion has been closed.