mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 22:34:56 +00:00
19 lines
545 B
Lua
19 lines
545 B
Lua
-- Check if all rows are selected
|
|
-- Single function module for data table selection
|
|
|
|
local getSelectionCount = require("selection.get_selection_count")
|
|
|
|
---@class IsAllSelected
|
|
local M = {}
|
|
|
|
---Check if all rows are selected
|
|
---@param state SelectionState Current selection state
|
|
---@param total integer Total number of rows
|
|
---@return boolean Whether all rows are selected
|
|
function M.isAllSelected(state, total)
|
|
if total == 0 then return false end
|
|
return getSelectionCount.getSelectionCount(state) == total
|
|
end
|
|
|
|
return M
|