grep-components 1.20.0-grepf-1816.1 → 1.20.0-grepf-1813.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,6 @@ import { TableColumn } from '..';
|
|
|
4
4
|
interface Properties<T> extends TableSortLabelProps {
|
|
5
5
|
column: TableColumn<T>;
|
|
6
6
|
onSortBy?: (row: T) => void;
|
|
7
|
-
empty?: boolean;
|
|
8
7
|
}
|
|
9
8
|
declare type Component<T> = React.FunctionComponent<Properties<T>>;
|
|
10
9
|
export declare const TableHeaderCell: Component<any>;
|
package/dist/index.js
CHANGED
|
@@ -3438,14 +3438,14 @@ var useTableHeaderStyles = makeStyles()(function (_theme, _a) {
|
|
|
3438
3438
|
});
|
|
3439
3439
|
|
|
3440
3440
|
var TableHeaderCell = function (_a) {
|
|
3441
|
-
var column = _a.column, onSortBy = _a.onSortBy, direction = _a.direction, active = _a.active, children = _a.children,
|
|
3441
|
+
var column = _a.column, onSortBy = _a.onSortBy, direction = _a.direction, active = _a.active, children = _a.children, props = __rest$1(_a, ["column", "onSortBy", "direction", "active", "children"]);
|
|
3442
3442
|
var classes = useTableHeaderStyles({ column: column }).classes;
|
|
3443
3443
|
var sortable = !!(onSortBy && column.sortable);
|
|
3444
|
-
if (sortable
|
|
3445
|
-
return (React__default.createElement(TableCell, __assign({ variant:
|
|
3444
|
+
if (sortable) {
|
|
3445
|
+
return (React__default.createElement(TableCell, __assign({ variant: "head", className: classes.th }, props),
|
|
3446
3446
|
React__default.createElement(TableSortLabel, { active: active, direction: direction }, children)));
|
|
3447
3447
|
}
|
|
3448
|
-
return
|
|
3448
|
+
return (React__default.createElement(TableCell, __assign({ variant: "head", className: classes.th }, props), children));
|
|
3449
3449
|
};
|
|
3450
3450
|
|
|
3451
3451
|
var TableHeader = function (_a) {
|
|
@@ -3457,7 +3457,7 @@ var TableHeader = function (_a) {
|
|
|
3457
3457
|
React__default.createElement(TableRow, null, headerColumns.map(function (column, index) {
|
|
3458
3458
|
var sortable = !!(onSortBy && column.sortable);
|
|
3459
3459
|
var label = column.label, colDef = column.colDef;
|
|
3460
|
-
return (React__default.createElement(TableHeaderCell, { key: index,
|
|
3460
|
+
return (React__default.createElement(TableHeaderCell, { key: index, column: column, direction: sortDirection, active: sortable ? sortBy === colDef : undefined, onClick: function () { return sortable && onSortBy(column); }, onKeyDown: onActivation(function (e) {
|
|
3461
3461
|
if (sortable) {
|
|
3462
3462
|
e.preventDefault();
|
|
3463
3463
|
onSortBy(column);
|
|
@@ -20793,7 +20793,7 @@ var ToolbarMenuItem = styled(NavLink)(function (_a) {
|
|
|
20793
20793
|
left: '50%',
|
|
20794
20794
|
width: '32px',
|
|
20795
20795
|
marginLeft: '-16px',
|
|
20796
|
-
borderBottom: "2px solid ".concat(theme.palette.secondary.
|
|
20796
|
+
borderBottom: "2px solid ".concat(theme.palette.secondary.light),
|
|
20797
20797
|
opacity: 0,
|
|
20798
20798
|
content: '""',
|
|
20799
20799
|
transition: 'all 0.3s ease',
|