AutoFill data property returns incorrect row index on datatable

AutoFill data property returns incorrect row index on datatable

mikeyfmikeyf Posts: 3Questions: 1Answers: 0

When using AutoFill with plug-in as im autofilling input boxes, the data property on cells[0][0] is not the correct row index.

Any ideas where i'm going wrong?

$.fn.dataTable.AutoFill.actions.names = {

    available: function ( dt, cells ) {            
        let startCell = (cells[0][0].index)
        console.log(startCell)
        return cells ;
    },

Thanks Michael

Answers

  • mikeyfmikeyf Posts: 3Questions: 1Answers: 0

    I should add that the selection of rows to be filled indexes are not sequential either? It's like it's reading the tables in a different row order?

  • mikeyfmikeyf Posts: 3Questions: 1Answers: 0
    edited June 2021

    and i;ve just figured it out myself :)

    **Had to enable bSort: false when creating the datatable. **

    Hopefully this helps someone else.

Sign In or Register to comment.