Inline Editor onBlur: 'submit' give error if clicked any other editable field in datatable

Inline Editor onBlur: 'submit' give error if clicked any other editable field in datatable

ali.mujahidali.mujahid Posts: 3Questions: 1Answers: 0

I am using Inline Editor onBlur: 'submit' give error white editing one field is active for editing if clicked any other editable field in datatable
dataTables.editor.min.js:21 Uncaught TypeError: Cannot read properties of undefined (reading 'attach')
at Editor.inline (dataTables.editor.min.js:21:90147)
at HTMLTableElement.<anonymous> (dataTables.editor.min.js:21:90303)

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Without more information available (please post to test cases showing the issue so we can offer more direct help), I would guess that you are using server-side processing? If so, please see this example, specifically how the inline() method is called with the cell index:

            editor.inline( table.cell( this ).index(), {
                onBlur: 'submit'
            } );
    

    Allan

  • ali.mujahidali.mujahid Posts: 3Questions: 1Answers: 0

    @allan Thanks for quick reply. This solved my problem.

  • ali.mujahidali.mujahid Posts: 3Questions: 1Answers: 0

    @allan

    editor.inline( table.cell( this ).index(), {
    onBlur: 'submit'
    } );

    this create problem

    var rowModifier = editor.modifier();
    var data = table.row(rowModifier).data();

    this give first row data only what ever row i am editing

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    You are using row() - i.e. a singular function, so yes, that will only ever select a single row. Use rows() if you need to get multiple rows of data.

    Allan

Sign In or Register to comment.