File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
resources/js/components/table Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1+ 'use no memo' ;
2+
13import { Button } from '@/components/ui/button' ;
24import {
35 DropdownMenu ,
68 DropdownMenuLabel ,
79 DropdownMenuSeparator ,
810} from '@/components/ui/dropdown-menu' ;
11+ import { normalizeString } from '@/lib/utils' ;
912import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu' ;
1013import { Table } from '@tanstack/react-table' ;
1114import { Settings2 } from 'lucide-react' ;
@@ -18,8 +21,8 @@ export function DataTableViewOptions<TData>({
1821 return (
1922 < DropdownMenu >
2023 < DropdownMenuTrigger asChild >
21- < Button variant = "outline" size = "sm" className = "ml-auto hidden h-8 lg:flex " >
22- < Settings2 />
24+ < Button variant = "outline" size = "sm" className = "ml-auto" >
25+ < Settings2 aria-hidden />
2326 View
2427 </ Button >
2528 </ DropdownMenuTrigger >
@@ -33,11 +36,10 @@ export function DataTableViewOptions<TData>({
3336 return (
3437 < DropdownMenuCheckboxItem
3538 key = { column . id }
36- className = "capitalize"
3739 checked = { column . getIsVisible ( ) }
38- onCheckedChange = { ( value ) => column . toggleVisibility ( value ) }
40+ onCheckedChange = { ( value ) => column . toggleVisibility ( ! ! value ) }
3941 >
40- { column . id . replace ( / [ _ - ] + / g , ' ' ) }
42+ { normalizeString ( column . id ) }
4143 </ DropdownMenuCheckboxItem >
4244 ) ;
4345 } ) }
You can’t perform that action at this time.
0 commit comments