Example of trapping enter key when using inline edit
Example of trapping enter key when using inline edit
In the documentation for submitOnReturn here, the text states:
Please note that when triggered, this action will call submit()E directly and without any configured options. If you have defined custom actions in a button click handler you would need to either disable this option and replace it with a custom event handler or also listen for the return key event.
We have a custom button function we need to call. Is there an example of calling that on an Enter key click? We are also using Angular as you can see.
Here is our code:
$('#dtProductChildren').on('click', 'tbody td:last-child', function (e) {
if (product.SomeValue == false) {
childrenTableEditor.inline(this, 'Quantity', {
submitOnReturn: false, // what else needs to happen to make this work?
buttons: { label: '>', fn: function () { $scope.updateQuantity(this); } }
});
}
});
Answers
bump