mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-18 21:44:06 +01:00
feat: update DataTable component to improve column visibility handling and filtering logic
This commit is contained in:
parent
b2837dd4a8
commit
8a95cf50db
@ -186,13 +186,11 @@ export function DataTable({ data }: { data: ModalProps[] }) {
|
|||||||
state: {
|
state: {
|
||||||
sorting,
|
sorting,
|
||||||
columnFilters,
|
columnFilters,
|
||||||
columnVisibility: {
|
columnVisibility,
|
||||||
profileURL: false,
|
|
||||||
logoURL: false,
|
|
||||||
},
|
|
||||||
rowSelection,
|
rowSelection,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
console.table(columnVisibility)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
@ -212,7 +210,7 @@ export function DataTable({ data }: { data: ModalProps[] }) {
|
|||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
{table
|
{table
|
||||||
.getAllColumns()
|
.getAllColumns()
|
||||||
.filter((column) => column.getCanHide())
|
.filter((column) => column.getCanHide() && column.id != "logoURL" && column.id != "profileURL")
|
||||||
.map((column) => {
|
.map((column) => {
|
||||||
return (
|
return (
|
||||||
<DropdownMenuCheckboxItem
|
<DropdownMenuCheckboxItem
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user