formatting
This commit is contained in:
@@ -67,20 +67,20 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex,
|
||||
const borderStyle = showResizeBorder
|
||||
? `2px solid ${draggingBorderColor} !important`
|
||||
: draggingColumn?.id === column.id
|
||||
? `1px dashed ${theme.palette.grey[500]}`
|
||||
: hoveredColumn?.id === column.id
|
||||
? `2px dashed ${draggingBorderColor}`
|
||||
: undefined;
|
||||
? `1px dashed ${theme.palette.grey[500]}`
|
||||
: hoveredColumn?.id === column.id
|
||||
? `2px dashed ${draggingBorderColor}`
|
||||
: undefined;
|
||||
|
||||
if (showResizeBorder) {
|
||||
return columnResizeDirection === "ltr" ? { borderRight: borderStyle } : { borderLeft: borderStyle };
|
||||
}
|
||||
const draggingBorders = borderStyle
|
||||
? {
|
||||
borderLeft: borderStyle,
|
||||
borderRight: borderStyle,
|
||||
borderTop: borderStyle,
|
||||
}
|
||||
borderLeft: borderStyle,
|
||||
borderRight: borderStyle,
|
||||
borderTop: borderStyle,
|
||||
}
|
||||
: undefined;
|
||||
|
||||
return draggingBorders;
|
||||
@@ -151,19 +151,19 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex,
|
||||
density === "compact"
|
||||
? "0.5rem"
|
||||
: density === "comfortable"
|
||||
? columnDefType === "display"
|
||||
? "0.75rem"
|
||||
: "1rem"
|
||||
: columnDefType === "display"
|
||||
? "1rem 1.25rem"
|
||||
: "1.5rem",
|
||||
? columnDefType === "display"
|
||||
? "0.75rem"
|
||||
: "1rem"
|
||||
: columnDefType === "display"
|
||||
? "1rem 1.25rem"
|
||||
: "1.5rem",
|
||||
pb: columnDefType === "display" ? 0 : showColumnFilters || density === "compact" ? "0.4rem" : "0.6rem",
|
||||
pt:
|
||||
columnDefType === "group" || density === "compact"
|
||||
? "0.25rem"
|
||||
: density === "comfortable"
|
||||
? ".75rem"
|
||||
: "1.25rem",
|
||||
? ".75rem"
|
||||
: "1.25rem",
|
||||
userSelect: enableMultiSort && column.getCanSort() ? "none" : undefined,
|
||||
verticalAlign: "middle",
|
||||
...getCommonMRTCellStyles({
|
||||
@@ -188,8 +188,8 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex,
|
||||
columnDefType === "group" || tableCellProps?.align === "center"
|
||||
? "center"
|
||||
: column.getCanResize()
|
||||
? "space-between"
|
||||
: "flex-start",
|
||||
? "space-between"
|
||||
: "flex-start",
|
||||
position: "relative",
|
||||
width: "100%",
|
||||
}}
|
||||
@@ -218,7 +218,7 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex,
|
||||
textAlign: "start",
|
||||
color: "#fff",
|
||||
fontWeight: "400",
|
||||
whiteSpace: "nowrap"
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
{HeaderElement}
|
||||
@@ -226,9 +226,10 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex,
|
||||
{column.getCanSort() && columnDefType !== "group" && (
|
||||
<MRT_TableHeadCellSortLabel
|
||||
sx={{
|
||||
width: 20, '& .MuiTableSortLabel-icon': {
|
||||
width: 20,
|
||||
"& .MuiTableSortLabel-icon": {
|
||||
color: `#fff !important`,
|
||||
}
|
||||
},
|
||||
}}
|
||||
header={header}
|
||||
table={table}
|
||||
|
||||
Reference in New Issue
Block a user