huge refactor on web-api and web-app
This commit is contained in:
parent
1d299e52d4
commit
265e10a658
23 changed files with 1545 additions and 1233 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
SortingState,
|
||||
useReactTable,
|
||||
} from '@tanstack/react-table';
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
import { useState, useRef } from 'react';
|
||||
import { TableVirtuoso } from 'react-virtuoso';
|
||||
|
||||
// Tooltip wrapper for cells that might overflow
|
||||
|
|
@ -93,10 +93,6 @@ export function DataTable<T>({
|
|||
getRowCanExpand,
|
||||
enableColumnResizing: true,
|
||||
columnResizeMode: 'onChange',
|
||||
getCenterTotalSize: () => {
|
||||
// Force table to use full width
|
||||
return '100%';
|
||||
},
|
||||
});
|
||||
|
||||
if (loading) {
|
||||
|
|
@ -139,7 +135,9 @@ export function DataTable<T>({
|
|||
const index = props['data-index'] as number;
|
||||
const item = flatRows[index];
|
||||
|
||||
if (!item) return null;
|
||||
if (!item) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (item.type === 'expanded') {
|
||||
return (
|
||||
|
|
@ -167,7 +165,7 @@ export function DataTable<T>({
|
|||
maxWidth: `${cell.column.getSize()}px`,
|
||||
}}
|
||||
>
|
||||
{(cell.column.columnDef as any).disableTooltip ? (
|
||||
{(cell.column.columnDef as { disableTooltip?: boolean }).disableTooltip ? (
|
||||
<div className="truncate overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue