inline editing with tab between columns "undoes" values?

inline editing with tab between columns "undoes" values?

sagimannsagimann Posts: 18Questions: 9Answers: 0

Hi all,
in the inline+tab example, try this:
1. click on a field to inline-edit the value
2. change the value to whatever
3. hit TAB
4. the inline editor moves to the next field
5. the previous field "undoes" the change I did in step 2 and now contains the old value before I made the change

How to I make sure that when I hit TAB, the changes I make are not lost?
thanks!

Answers

  • allanallan Posts: 63,075Questions: 1Answers: 10,384 Site admin

    Use the submitOnBlur option or form-options. The form options can be specified where you call inline().

    Allan

  • sagimannsagimann Posts: 18Questions: 9Answers: 0

    tried it, did not change anything, same symptoms:

    editor = new $.fn.dataTable.Editor( {
        ajax: function ( method, url, data, success, error ) {
            console.log(data);
            success(data);
        },
    table: "#values",
                fields: [
                         {
                            label: "Quantity:",
                            name: "quantity"
                         }, {
                             label: "Type:",
                             name: "type"
                         },
                ],
                submitOnBlur: true
            } );
    
  • sagimannsagimann Posts: 18Questions: 9Answers: 0

    at the moment, I found a solution of calling "editor.submit()' from within the on() method that processes the tab clicks. seems to work for now, we'll see...

This discussion has been closed.