Distinguish whether edit oder duplicate button was clicked in preOpen event

Distinguish whether edit oder duplicate button was clicked in preOpen event

maidenmaiden Posts: 16Questions: 6Answers: 0

Hi,
in the editor.preOpen event I need to distinguish which button was clicked, edit button or duplicate button; both buttons show action "edit" and the mode "main" in the console although the duplicate-button has the mode "create" assigned ; how can I tell which button was clicked?

buttons: [
        { extend: 'create', editor: editor },
        { extend: 'edit',   editor: editor },
                { extend: "selected",
          text: 'Duplizieren',
          action: function (e, dt, node, config) {
              editor
                  .edit( wftable.rows( {selected: true} ).indexes(), {
                      title: 'Datensatz duplizieren',
                      buttons: 'neuen Datensatz speichern'

                  } )
                  .mode( 'create' );
          }

Thanks in advance, martin

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.