got rid of unused fragment
This commit is contained in:
parent
587fc0f228
commit
55a01f7099
1 changed files with 6 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
SortingState,
|
||||
useReactTable,
|
||||
} from '@tanstack/react-table';
|
||||
import { Fragment, useState } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { TableVirtuoso } from 'react-virtuoso';
|
||||
|
||||
interface DataTableProps<T> {
|
||||
|
|
@ -89,7 +89,7 @@ export function DataTable<T>({
|
|||
TableRow: props => {
|
||||
const index = props['data-index'] as number;
|
||||
const item = flatRows[index];
|
||||
|
||||
|
||||
if (!item) return null;
|
||||
|
||||
if (item.type === 'expanded') {
|
||||
|
|
@ -163,7 +163,9 @@ export function DataTable<T>({
|
|||
className={cn(
|
||||
'absolute right-0 top-0 h-full w-1 cursor-col-resize user-select-none touch-none',
|
||||
'hover:bg-primary-500 hover:opacity-100',
|
||||
header.column.getIsResizing() ? 'bg-primary-500 opacity-100' : 'bg-border opacity-0'
|
||||
header.column.getIsResizing()
|
||||
? 'bg-primary-500 opacity-100'
|
||||
: 'bg-border opacity-0'
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -176,4 +178,4 @@ export function DataTable<T>({
|
|||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue