feat: update TableList to pass parameters to onCount function for improved data handling

This commit is contained in:
faisolavolut 2025-02-26 14:38:40 +07:00
parent 6ed1e29fed
commit 2746ea873b
1 changed files with 7 additions and 1 deletions

View File

@ -249,7 +249,13 @@ export const TableList: React.FC<any> = ({
); );
try { try {
if (typeof onCount === "function") { if (typeof onCount === "function") {
const res = await onCount(); const params = await events("onload-param", {
take: 1,
paging: 1,
search: local.search,
...local.filter,
});
const res = await onCount(params);
local.count = res; local.count = res;
local.render(); local.render();
} }