fix: update HeaderComponent assignment in Form component for improved reactivity

This commit is contained in:
faisolavolut 2025-02-17 05:51:08 +07:00
parent 822f50595a
commit f329480d60
1 changed files with 2 additions and 2 deletions

View File

@ -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">