Skip to content

Commit

Permalink
Revert "block table header filter for index column"
Browse files Browse the repository at this point in the history
This reverts commit a804bfc.
  • Loading branch information
BigSillyTiger committed Oct 30, 2024
1 parent c79ef1f commit 119cd26
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 68 deletions.
51 changes: 22 additions & 29 deletions src/components/table/CTHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,28 @@ const CTHead = <T extends object>({
}: Tprops<T>) => {
const tableHeader = table.getHeaderGroups().map((headerGroup) => (
<tr key={headerGroup.id}>
{headerGroup.headers.map((header) => {
return (
<CTh
key={header.id}
scope="col"
className={`${cnTh}`}
table={table}
header={header}
>
<button
onClick={header.column.getToggleSortingHandler()}
>
{flexRender(
header.column.columnDef.header,
header.getContext()
)}
{sortingIcon(header.column.getIsSorted())}
</button>
{hFilter &&
header.column.getCanFilter() &&
// block filter for Index column
header.id.toLocaleLowerCase() !== "index" ? (
<div className="mr-3">
<HeaderFilterFaceted column={header.column} />
</div>
) : null}
</CTh>
);
})}
{headerGroup.headers.map((header) => (
<CTh
key={header.id}
scope="col"
className={`${cnTh}`}
table={table}
header={header}
>
<button onClick={header.column.getToggleSortingHandler()}>
{flexRender(
header.column.columnDef.header,
header.getContext()
)}
{sortingIcon(header.column.getIsSorted())}
</button>
{hFilter && header.column.getCanFilter() ? (
<div className="mr-3">
<HeaderFilterFaceted column={header.column} />
</div>
) : null}
</CTh>
))}
</tr>
));
return (
Expand Down
39 changes: 0 additions & 39 deletions src/configs/columnDefs/defService.tsx

This file was deleted.

0 comments on commit 119cd26

Please sign in to comment.