update TableUI.tsx

This commit is contained in:
faisolavolut 2025-02-10 18:25:53 +07:00
parent 751055fa30
commit 9447b720a1
1 changed files with 13 additions and 1 deletions

View File

@ -33,6 +33,7 @@ export const TableUI: React.FC<any> = ({
}) => { }) => {
const local = useLocal({ const local = useLocal({
tab: get(tab, "[0].id"), tab: get(tab, "[0].id"),
table: null as any,
}); });
return ( return (
@ -87,6 +88,11 @@ export const TableUI: React.FC<any> = ({
if (typeof onTab === "function") { if (typeof onTab === "function") {
onTab(local.tab); onTab(local.tab);
} }
if (typeof local?.table?.refresh === "function") {
{
local.table.refresh();
}
}
}} }}
tabContent={(data: any) => { tabContent={(data: any) => {
return <></>; return <></>;
@ -104,7 +110,13 @@ export const TableUI: React.FC<any> = ({
column={column} column={column}
onLoad={onLoad} onLoad={onLoad}
onCount={onCount} onCount={onCount}
onInit={onInit} onInit={(e: any) => {
local.table = e;
local.render();
if (typeof onInit === "function") {
onInit(e);
}
}}
/> />
</div> </div>
</div> </div>