Editor and Autofill error on pages after 1

Editor and Autofill error on pages after 1

msand01msand01 Posts: 54Questions: 24Answers: 1
edited July 2018 in Editor

Hi,
I am currently receiving an error using Editor, KeyTable, and AutoFill when attempting to autofill a column vertically; the error does not happen on a first page, only after paging to subsequent pages. The error occurs in datatables.autofill.js in the current version, 2.3.0, on line 587:

// jQuery doesn't give a `table` as the offset parent oddly, so use DOM directly
                currOffsetParent = $(currNode[0].offsetParent);

The error is: Uncaught TypeError: Cannot read property 'offsetParent' of undefined

The error occurs when first clicking in the cell to drag, and so dragging/copying never even takes place. I am using the current js libraries for the above : DataTables, 1.10.18, Editor 1.7.4, KeyTable 2.4.0, Autofill 2.3.0, and jQuery 3.3.1.

Can anyone tell me if they've seen this error before and if this could be a configuration issue or bug?

This question has an accepted answers - jump to answer

Answers

  • msand01msand01 Posts: 54Questions: 24Answers: 1

    My configuration:

        dtTable = $("#EditorTable").DataTable({
            data: items,
            scrollX: "100%",
            scrollY: 650,
            lengthMenu: [30, 50, 100],
            pageLength: 100,
            scrollCollapse: true,
            order: [[1, 'asc']],
            orderClasses: true,
            processing: true,
            colReorder: { fixedColumnsLeft: 18 },
            autoFill: { columns: [4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17] },
            stateSave: true,
            stateDuration: 0,
            keys: {
                columns: [1, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17],
                editor: dtEditor,
                editOnFocus: true,
                drawType: 'page'
            }
    
  • allanallan Posts: 62,110Questions: 1Answers: 10,185 Site admin

    Thanks for letting me know about this! I'll check into it and post back shortly when I've got this sorted out. It does look like a bug.

    Allan

  • allanallan Posts: 62,110Questions: 1Answers: 10,185 Site admin
    Answer ✓

    I've just committed a fix for this issue. The nightly will carry the fix shortly.

    Thanks again!
    Allan

  • msand01msand01 Posts: 54Questions: 24Answers: 1

    Thank you so much, that did the trick!

This discussion has been closed.