Files
metabuilder/packages/data_table/seed/scripts/columns/text.lua
JohnDoe6345789 bf1401fe34 Enhance module definitions and add type annotations across various packages
- Added type annotations and class definitions in the dashboard layout, stats, and data table modules for improved type safety and documentation.
- Introduced new classes for UI components, props, and configuration in the form builder, navigation menu, notification center, and UI dialogs packages.
- Implemented detailed type definitions for actions, fields, and pagination components to streamline usage and enhance clarity.
- Updated initialization functions in multiple packages to include versioning and installation context.
- Improved structure and readability of the codebase by organizing and documenting component properties and methods.
2025-12-30 10:21:33 +00:00

26 lines
647 B
Lua

-- Text column definition
---@class TextColumn
---@field type "text"
---@field id string Column identifier
---@field label string Column header label
---@field width string Column width (e.g., "auto", "100px")
---@field sortable boolean Whether the column is sortable
---Create a text column definition
---@param id string Column identifier
---@param label string Column header label
---@param width? string Column width (default: "auto")
---@return TextColumn
local function text_column(id, label, width)
return {
type = "text",
id = id,
label = label,
width = width or "auto",
sortable = true
}
end
return text_column