Tab between columns problem
Tab between columns problem
lockedscope
Posts: 8Questions: 1Answers: 0
For the following example; https://editor.datatables.net/examples/inline-editing/tabControl.html apply following code in Chrome Developer Tools console.
$('#example').off( 'click' );
$('#example').on( 'click', 'tbody td:not(:first-child)', function (e) {
editor.inline( this, {
submitOnBlur: false
} );
} );
Then click on some cell and press and hold Tab key, focus moves outside of table after traversing some inputs. Then try to click on any input again, editor does not open up. Also, click New,Edit,Delete buttons the popup dialog opens and closes immediately. How could this be resolved?
Thanks
This discussion has been closed.
Answers
This is something that has been fixed in the development version and will be released in v1.4.1 in the next couple of days.
Having said that, there is still an issue if you use the
ajax
option and do not perform an asynchronous action. That is something I am working on, although it is unlikely to be address for 1.4.1 unfortunately.Allan
Ok thanks. I used following for ajax, is it fine?
Actually no - that is synchronous. What you would need to do is:
Not ideal I realise!
Allan
I actually do not want to post back to the server. Just build the table at client side and upload the final table (as json) to the server.
Yes, the above will do that. It just makes it async.
As I say, not perfect, and is is a workaround for a known bug that I will address, but can't say exactly when yet.
Allan
Are there any alternatives to ajax for saving editor value to dom table without posting to server?
To a large extent Editor assumes that the data will be saved somewhere that is not the table (the table is just a display container, not a data store). You could do as you have above, which is the closest with simple Javascript, but adding rows might present more a challenge since you need to be able to uniquely identify each row (i.e. it needs a primary key value, which normally is auto-generated by a database sequence).
Allan