Appearance
customActionsTop
The customActionsTop hook allows developers to add custom actions to the table actions shown at the top left corner.
Parameters
| Parameter | Type | Description |
|---|---|---|
| table | reference | Table instance and state. |
Structure parameter table
js
table: {
instance: *ref_to_table_api,
state: *ref_to_table_store,
requery: *ref_to_requery_table_function,
}Return Value
| Type | Description |
|---|---|
| string | An HTML string, typically created using a template literal. |
| HTMLElement | A DOM element node created with vanilla JavaScript. |
| jQuery | A jQuery object wrapping the new element. |
✨ Example of a customActionTop Hook
This example returns a template literal.
js
((table) => {
return `<div>
<button onclick="alert('My custom action')">My Custom Action</button>
</div>`
})✨ Example of a Global Function Call
js
((table) => {
return myCustomAction()
})