Feature request

Feature request

ZakInterDevZakInterDev Posts: 51Questions: 16Answers: 0

Possible we can define the href attribute when creating a button? Having logic that if the href is defined, i.e. not a '#', then the anchor tag acts as normal else you preventDefault (which i assume you're doing now to perform the action of the button).

99% of the time we use Editor for our add/edit/delete. Though there's this small chance the form is too complex for Editor and we provide entire page dedicated to it. So by having the add button simply act like a normal anchor tag, would allow for this.

new $.fn.dataTable.Buttons(table, [
    {text: 'Add', className: "add-contract", href: "<LINK HERE>"}
]);

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,468 Site admin
    Answer ✓

    Hi,

    I think this probably falls under this feature request. That one was specifically for id's, but I think it should be generalised to all attributes.

    Allan

  • ZakInterDevZakInterDev Posts: 51Questions: 16Answers: 0

    Yup, that sounds good! :smile:

This discussion has been closed.