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