Export
IP Table Documentation
Overview
This script opens an ip_table
with a given set of data, actions, and an event handler for closing.
Table Configuration
Properties:
id
: (string) The title identifier for the table.head
: (table) The headers of the table columns.list
: (table) A list of data entries.onClose
: (function) A function that executes when the table is closed.actions
: (table) A set of named actions that execute functions when a row is selected.
Example Usage
exports.ip_table:open({
id = "Title",
head = { "Name", "VipLevel" },
list = {
{"RoyleWind","5"},
{"SLNC","2"},
{"XPHANTOP","1"},
},
onClose = function()
print("Closed ๐ช")
end,
actions = {
["Print"] = function(index, data)
print("Name: " .. data[1])
end,
["Action 2"] = function(index, data)
print("Name: " .. data[1])
end,
}
})
Actions
Print: Prints the
Name
field of the selected row.Action 2: Prints the
Name
field of the selected row (duplicate function for customization).
Closing Behavior
When the table is closed, it prints Closed ๐ช
in the console.
Notes
This script is designed for integration within an existing system using
exports.ip_table
.Modify the
actions
section to add additional functionalities.
Last updated