@@ -49,6 +49,7 @@ import {
4949 DrawerHeader ,
5050 DrawerTitle ,
5151 DrawerDescription ,
52+ NavigationOverlay ,
5253 Button ,
5354 Tabs ,
5455 TabsList ,
@@ -974,8 +975,52 @@ export const ObjectView: React.FC<ObjectViewProps> = ({
974975 // Determine which form container to render
975976 const formLayout = navigationConfig ?. mode === 'modal' ? 'modal'
976977 : navigationConfig ?. mode === 'drawer' ? 'drawer'
978+ : navigationConfig ?. mode === 'split' ? 'split'
979+ : navigationConfig ?. mode === 'popover' ? 'popover'
977980 : layout ;
978981
982+ // Build the record detail content for NavigationOverlay (split/popover modes)
983+ const renderOverlayDetail = ( record : Record < string , unknown > ) => (
984+ < div className = "space-y-3" >
985+ < ObjectForm schema = { buildFormSchema ( ) } dataSource = { dataSource } />
986+ </ div >
987+ ) ;
988+
989+ // For split mode, wrap content inside NavigationOverlay with mainContent
990+ if ( formLayout === 'split' ) {
991+ const objectLabel = ( objectSchema ?. label as string ) || schema . objectName ;
992+ return (
993+ < div className = { cn ( 'flex flex-col h-full min-w-0 overflow-hidden' , className ) } >
994+ { ( schema . title || schema . description ) && (
995+ < div className = "mb-4 shrink-0" >
996+ { schema . title && < h2 className = "text-2xl font-bold tracking-tight" > { schema . title } </ h2 > }
997+ { schema . description && < p className = "text-muted-foreground mt-1" > { schema . description } </ p > }
998+ </ div >
999+ ) }
1000+ < div className = "mb-4 shrink-0" > { renderToolbar ( ) } </ div >
1001+ < div className = "flex-1 min-h-0 min-w-0 overflow-hidden" >
1002+ { isFormOpen && selectedRecord ? (
1003+ < NavigationOverlay
1004+ isOpen = { isFormOpen }
1005+ selectedRecord = { selectedRecord }
1006+ mode = "split"
1007+ close = { handleFormCancel }
1008+ setIsOpen = { ( open : boolean ) => { if ( ! open ) handleFormCancel ( ) ; } }
1009+ width = { navigationConfig ?. width }
1010+ isOverlay = { true }
1011+ title = { `${ objectLabel } Detail` }
1012+ mainContent = { < div className = "h-full overflow-auto" > { renderContent ( ) } </ div > }
1013+ >
1014+ { renderOverlayDetail }
1015+ </ NavigationOverlay >
1016+ ) : (
1017+ renderContent ( )
1018+ ) }
1019+ </ div >
1020+ </ div >
1021+ ) ;
1022+ }
1023+
9791024 return (
9801025 < div className = { cn ( 'flex flex-col h-full min-w-0 overflow-hidden' , className ) } >
9811026 { /* Title and description */ }
@@ -1003,6 +1048,21 @@ export const ObjectView: React.FC<ObjectViewProps> = ({
10031048 { /* Form (drawer or modal) */ }
10041049 { formLayout === 'drawer' && renderDrawerForm ( ) }
10051050 { formLayout === 'modal' && renderModalForm ( ) }
1051+ { /* Popover mode — uses NavigationOverlay Dialog fallback (no popoverTrigger) */ }
1052+ { formLayout === 'popover' && isFormOpen && selectedRecord && (
1053+ < NavigationOverlay
1054+ isOpen = { isFormOpen }
1055+ selectedRecord = { selectedRecord }
1056+ mode = "popover"
1057+ close = { handleFormCancel }
1058+ setIsOpen = { ( open : boolean ) => { if ( ! open ) handleFormCancel ( ) ; } }
1059+ width = { navigationConfig ?. width }
1060+ isOverlay = { true }
1061+ title = { getFormTitle ( ) }
1062+ >
1063+ { renderOverlayDetail }
1064+ </ NavigationOverlay >
1065+ ) }
10061066 </ div >
10071067 ) ;
10081068} ;
0 commit comments