Filtering the scrolling table

Filter function definition:

local Filter = function(self, rowdata)
	return true;
end

Example user provided filters.

SDKP_FILTERS_LIST = {
	"Show All", -- [1]
	"Only Raid", -- [2]
};
SDKP_FILTERS = {
	[SDKP_FILTERS_LIST[1]] = function(self, row)
		return true;
	end,
	[SDKP_FILTERS_LIST[2]] = function(self, row)
		local nRaidMembers = GetNumRaidMembers();
		for i = 1, nRaidMembers do
			local raidMember = GetRaidRosterInfo(i);
			if row.cols[1].value == raidMember then 
				return true;
			end
		end
		return false;
	end,
};

Comments

Posts Quoted:
Reply
Clear All Quotes