update TableUI.tsx
This commit is contained in:
parent
751055fa30
commit
9447b720a1
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue