mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 10:23:27 +00:00
fix: revert ResizableTableContainer — was causing wide checkbox column
Column resize needs dedicated CSS work. Show/hide columns still works. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,9 +17,7 @@ import {
|
||||
Cell as AriaCell,
|
||||
Collection as AriaCollection,
|
||||
Column as AriaColumn,
|
||||
ColumnResizer as AriaColumnResizer,
|
||||
Group as AriaGroup,
|
||||
ResizableTableContainer as AriaResizableTableContainer,
|
||||
Row as AriaRow,
|
||||
Table as AriaTable,
|
||||
TableBody as AriaTableBody,
|
||||
@@ -117,9 +115,9 @@ const TableRoot = ({ className, size = "md", ...props }: TableRootProps) => {
|
||||
|
||||
return (
|
||||
<TableContext.Provider value={{ size: context?.size ?? size }}>
|
||||
<AriaResizableTableContainer className="flex-1 overflow-auto min-h-0">
|
||||
<div className="flex-1 overflow-auto min-h-0">
|
||||
<AriaTable className={(state) => cx("w-full", typeof className === "function" ? className(state) : className)} {...props} />
|
||||
</AriaResizableTableContainer>
|
||||
</div>
|
||||
</TableContext.Provider>
|
||||
);
|
||||
};
|
||||
@@ -170,10 +168,9 @@ TableHeader.displayName = "TableHeader";
|
||||
interface TableHeadProps extends AriaColumnProps, Omit<ThHTMLAttributes<HTMLTableCellElement>, "children" | "className" | "style" | "id"> {
|
||||
label?: string;
|
||||
tooltip?: string;
|
||||
allowsResizing?: boolean;
|
||||
}
|
||||
|
||||
const TableHead = ({ className, tooltip, label, children, allowsResizing, ...props }: TableHeadProps) => {
|
||||
const TableHead = ({ className, tooltip, label, children, ...props }: TableHeadProps) => {
|
||||
const { selectionBehavior } = useTableOptions();
|
||||
|
||||
return (
|
||||
@@ -189,8 +186,8 @@ const TableHead = ({ className, tooltip, label, children, allowsResizing, ...pro
|
||||
}
|
||||
>
|
||||
{(state) => (
|
||||
<AriaGroup className="flex items-center gap-1" role="presentation">
|
||||
<div className="flex items-center gap-1 flex-1 min-w-0">
|
||||
<AriaGroup className="flex items-center gap-1">
|
||||
<div className="flex items-center gap-1">
|
||||
{label && <span className="text-xs font-semibold whitespace-nowrap text-quaternary">{label}</span>}
|
||||
{typeof children === "function" ? children(state) : children}
|
||||
</div>
|
||||
@@ -209,10 +206,6 @@ const TableHead = ({ className, tooltip, label, children, allowsResizing, ...pro
|
||||
) : (
|
||||
<FontAwesomeIcon icon={faSort} className="text-fg-quaternary" />
|
||||
))}
|
||||
|
||||
{allowsResizing && (
|
||||
<AriaColumnResizer className="absolute top-0 right-0 bottom-0 w-1 cursor-col-resize bg-transparent hover:bg-brand data-[resizing]:bg-brand" />
|
||||
)}
|
||||
</AriaGroup>
|
||||
)}
|
||||
</AriaColumn>
|
||||
|
||||
@@ -133,9 +133,6 @@ export const LeadTable = ({
|
||||
id={column.id}
|
||||
label={column.label}
|
||||
allowsSorting={column.allowsSorting}
|
||||
allowsResizing={column.id !== 'actions'}
|
||||
defaultWidth={column.defaultWidth}
|
||||
minWidth={50}
|
||||
/>
|
||||
)}
|
||||
</Table.Header>
|
||||
|
||||
Reference in New Issue
Block a user