Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3740

How to know the field name of the column on which the inline edit has been triggered?

$
0
0

Hi,

I understand that I can edit only one field in an inline edit call. On the presubmit event, I am wanting to know which column, or field is being updated. I am trying to use modifier() but it gives me the complete object. I want to know how to derive the field name from it.

Some excerpts from my code:

$('#dataTable').on('click', 'tbody td.editable', function (e) {
            editor.inline(this, {
                submit: 'allIfChanged'
            });
        });
        
        editor.on('preSubmit', function (e, o, action) {
            
            console.table(editor.modifier());

            /* Is there any api like below code?
            //console.log(editor.modifier().fieldName());
            //console.log(editor.modifier().column());
             */
            
        });

Viewing all articles
Browse latest Browse all 3740

Trending Articles