Troubles with second destroy

Troubles with second destroy

kilo415kilo415 Posts: 15Questions: 3Answers: 1

Table is exists
Destroy by click (change language on the page)
- table.destroy(false) - OK
- again create table - OK
- table.destroy(false) - ERROR (only help reload page)
Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at removeChild (http://localhost:3000/static/js/bundle.js:25945:22)
at commitDeletionEffectsOnFiber (http://localhost:3000/static/js/bundle.js:36973:19)
at commitDeletionEffects (http://localhost:3000/static/js/bundle.js:36927:9)
at recursivelyTraverseMutationEffects (http://localhost:3000/static/js/bundle.js:37165:13)
at commitMutationEffectsOnFiber (http://localhost:3000/static/js/bundle.js:37239:13)
at recursivelyTraverseMutationEffects (http://localhost:3000/static/js/bundle.js:37176:11)
at commitMutationEffectsOnFiber (http://localhost:3000/static/js/bundle.js:37239:13)
at recursivelyTraverseMutationEffects (http://localhost:3000/static/js/bundle.js:37176:11)
at commitMutationEffectsOnFiber (http://localhost:3000/static/js/bundle.js:37239:13)
at recursivelyTraverseMutationEffects (http://localhost:3000/static/js/bundle.js:37176:11)
Why first work, but if destroy second no ?

destroyDatatable(tableGrade,false);
createdTable(grades.data); 
options table: 
{responsive: true,
        searchPanes:
        {
            viewCount: true,
            collapse: true,
            initCollapsed: true,
            layout:  "columns-2" 

        },
        deferRender: true,
        dom: "P<\"d-flex justify-content-between wrap mb-2\"lf>rt<\"d-flex justify-content-between wrap mt-2\"ip>",
        scrollY: "400px",
        retrieve: true,
        language: i18n.resolvedLanguage === Locales.RU ? languageRU : languageEN,
        destroy: true
}

HTML elements same: init = after destroy and create, and exists
Before destroy, check exists: refTable:React.Ref<HTMLTableElement>, and table:Api<unkown>
Please help

Answers

  • colincolin Posts: 15,227Questions: 1Answers: 2,593

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Colin

  • kilo415kilo415 Posts: 15Questions: 3Answers: 1

    Ok, later, i send test case

Sign In or Register to comment.