Question regarding Keyboard activation
Question regarding Keyboard activation
ShowGrounds
Posts: 2Questions: 1Answers: 0
Hi,
We have added two buttons on our datatable editor form. The "Create" button saves and closes the form dialog. "Save And New" button saves and reopens another new form.
We are trying to use Keyboard Activation for these buttons but its not working
buttons: [
{ extend: 'create', editor: editor,
formButtons: [
{
label: 'Create',
fn: function () {
var that = this;
this.submit( function () {
that.close();
} );
},
key: {
altKey: true,
key: 's'
},
}, {
label: 'Save and New',
fn: function () { this.submit(); this.create(); },
key: {
altKey: true,
key: 'c'
},
}
],
},
]
This discussion has been closed.
Answers
While the Buttons library does support keyboard activation for its buttons, Editor does not at this time match that.
The documentation for the Editor Buttons API options notes that it supports
text
,className
,action
andtabIndex
.Allan