fix: update HeaderComponent assignment in Form component for improved reactivity
This commit is contained in:
parent
822f50595a
commit
f329480d60
|
|
@ -198,7 +198,7 @@ export const Form: React.FC<any> = ({
|
|||
}, []);
|
||||
|
||||
// Tambahkan dependency ke header agar reaktif
|
||||
const HeaderComponent = header(local);
|
||||
const HeaderComponent = typeof header === "function" ? header(local) : <></>;
|
||||
if (!local.ready)
|
||||
return (
|
||||
<div className="flex flex-grow flex-row items-center justify-center">
|
||||
|
|
@ -210,7 +210,7 @@ export const Form: React.FC<any> = ({
|
|||
);
|
||||
return (
|
||||
<div className={`flex-grow flex-col flex ${className}`}>
|
||||
<div className="flex flex-row">{header(local)}</div>
|
||||
<div className="flex flex-row">{HeaderComponent}</div>
|
||||
{showResize ? (
|
||||
// Resize panels...
|
||||
<ResizablePanelGroup direction="vertical" className="rounded-lg border">
|
||||
|
|
|
|||
Loading…
Reference in New Issue