deploy: a3cc685620
This commit is contained in:
@@ -20,59 +20,17 @@ row selection, and scrolling capabilities.
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[Table.new](#Table.new)|Table|Creates a new Table instance
|
||||
|[Table:sortData](#Table:sortData)|Table|Sorts the table data by the specified column
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[Table:init](#Table:init)|Table|Initializes the Table instance
|
||||
|[Table:mouse_click](#Table:mouse_click)|boolean|Handles header clicks for sorting and row selection
|
||||
|[Table:mouse_scroll](#Table:mouse_scroll)|boolean|Handles scrolling through the table data
|
||||
|[Table:render](#Table:render)|-|Renders the table with headers, data and scrollbar
|
||||
|[Table:sortData](#Table:sortData)|Table|Sorts the table data by the specified column
|
||||
|
||||
|
||||
## Table.new()
|
||||
Creates a new Table instance
|
||||
|
||||
### Returns
|
||||
* `Table` `self` The newly created Table instance
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
local table = Table.new()
|
||||
```
|
||||
|
||||
## Table:init(props, basalt)
|
||||
Initializes the Table instance
|
||||
|
||||
### Parameters
|
||||
* `props` `table` The properties to initialize the element with
|
||||
* `basalt` `table` The basalt instance
|
||||
|
||||
### Returns
|
||||
* `Table` `self` The initialized instance
|
||||
|
||||
## Table:mouse_click(button, x, y)
|
||||
Handles mouse click events
|
||||
|
||||
### Parameters
|
||||
* `button` `number` The button that was clicked
|
||||
* `x` `number` The x position of the click
|
||||
* `y` `number` The y position of the click
|
||||
|
||||
### Returns
|
||||
* `boolean` `handled` Whether the event was handled
|
||||
|
||||
## Table:mouse_scroll(direction, x, y)
|
||||
Handles mouse scroll events
|
||||
|
||||
### Parameters
|
||||
* `direction` `number` The scroll direction (-1 up, 1 down)
|
||||
* `x` `number` The x position of the scroll
|
||||
* `y` `number` The y position of the scroll
|
||||
|
||||
### Returns
|
||||
* `boolean` `handled` Whether the event was handled
|
||||
|
||||
## Table:render()
|
||||
Renders the table
|
||||
|
||||
## Table:sortData(columnIndex)
|
||||
Sorts the table data by column
|
||||
|
||||
Reference in New Issue
Block a user