@@ -24,6 +24,8 @@ export interface ListViewProps {
2424 onSearchChange ?: ( search : string ) => void ;
2525 /** Callback when a row/item is clicked (overrides NavigationConfig) */
2626 onRowClick ?: ( record : Record < string , unknown > ) => void ;
27+ /** Show view type switcher (Grid/Kanban/etc). Default: false (view type is fixed) */
28+ showViewSwitcher ?: boolean ;
2729 [ key : string ] : any ;
2830}
2931
@@ -68,6 +70,7 @@ export const ListView: React.FC<ListViewProps> = ({
6870 onSortChange,
6971 onSearchChange,
7072 onRowClick,
73+ showViewSwitcher = false ,
7174 ...props
7275} ) => {
7376 // Kernel level default: Ensure viewType is always defined (default to 'grid')
@@ -392,14 +395,16 @@ export const ListView: React.FC<ListViewProps> = ({
392395 { /* Airtable-style Toolbar */ }
393396 < div className = "border-b px-4 py-2 flex items-center justify-between gap-4 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60" >
394397 < div className = "flex items-center gap-2 flex-1 overflow-hidden" >
395- { /* View Switcher on the Left */ }
396- < div className = "flex items-center pr-2 border-r mr-2" >
397- < ViewSwitcher
398- currentView = { currentView }
399- availableViews = { availableViews }
400- onViewChange = { handleViewChange }
401- />
402- </ div >
398+ { /* View Switcher on the Left (optional, hidden by default) */ }
399+ { showViewSwitcher && (
400+ < div className = "flex items-center pr-2 border-r mr-2" >
401+ < ViewSwitcher
402+ currentView = { currentView }
403+ availableViews = { availableViews }
404+ onViewChange = { handleViewChange }
405+ />
406+ </ div >
407+ ) }
403408
404409 { /* Action Tools */ }
405410 < div className = "flex items-center gap-1" >
0 commit comments