mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 22:34:56 +00:00
28 lines
810 B
Lua
28 lines
810 B
Lua
-- Number column definition
|
|
|
|
---@class NumberColumn
|
|
---@field type "number" Column type identifier
|
|
---@field id string Column identifier
|
|
---@field label string Column header label
|
|
---@field width string Column width (e.g., "100px")
|
|
---@field sortable boolean Whether the column is sortable
|
|
---@field align "right" Text alignment
|
|
|
|
---Create a number column definition
|
|
---@param id string Column identifier
|
|
---@param label string Column header label
|
|
---@param width? string Column width (default: "100px")
|
|
---@return NumberColumn number_column The number column definition
|
|
local function number_column(id, label, width)
|
|
return {
|
|
type = "number",
|
|
id = id,
|
|
label = label,
|
|
width = width or "100px",
|
|
sortable = true,
|
|
align = "right"
|
|
}
|
|
end
|
|
|
|
return number_column
|