The customActionsTop hook allows developers to add custom actions to the table actions shown at the top left corner.
Parameters #
- table: reference to the table instance and state
table: {
instance: " - reference to table api - ",
state: " - reference to table store - ",
requery: " - function to perform requery - ",
}
Return value #
Template literal, DOM element or jQuery object
Example of a customActionTop hook #
((table) => {
return `<div>
<button onclick="alert('My custom action')">My Custom Action</button>
</div>`
})
Example calling a function defined in the app global hook #
((table) => {
return myCustomAction()
})