Skip to content

Bug using plugin datatables.net-colreorder-bs4 #40

@juliorosseti

Description

@juliorosseti

I realized that when trying to change the column positions the error below appears:
Uncaught TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.

image

I looked for the bug in the Datatables community and found this discussion:
https://datatables.net/forums/discussion/59248/colreorder-failed-to-execute-insertbefore-on-node-parameter-1-is-not-of-type-node

Then I realized that there are actually two "tr" in the code generated by the component:
image

When I remove the void "tr", the error no longer happens.

I used this code below in the function @table-created="doCreated"

doCreated(comp) {
        this.$refs.table.$el
                .querySelector(".dataTables_scrollHead table thead tr")
                .remove()
}

BTW, thanks for developing this Vue wrapper component. Works great!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions