morse-react-tables
Advanced tools
Comparing version 0.12.6 to 0.12.10
@@ -25,3 +25,3 @@ import React, { ComponentProps, ReactElement, ReactNode } from "react"; | ||
isRowSelected?: (item: T) => boolean; | ||
children: DatasetTableChild<T>[] | DatasetTableChild<T>; | ||
children: Array<false | DatasetTableChild<T>> | DatasetTableChild<T>; | ||
/** Appends a row to the bottom of the table without the dataset specific click handlers/props. */ | ||
@@ -28,0 +28,0 @@ footer?: JSX.Element | JSX.Element[]; |
@@ -54,2 +54,5 @@ "use strict"; | ||
var columnHeadings = react_1.default.Children.map(children, function (column, index) { | ||
if (typeof column === "boolean" || column === null) { | ||
return; | ||
} | ||
var _a = column.props, label = _a.label, render = _a.render, headingClassName = _a.headingClassName, columnProps = __rest(_a, ["label", "render", "headingClassName"]); | ||
@@ -71,2 +74,5 @@ return (react_1.default.createElement(morse_react_1.TableHeaderCell, __assign({ key: "table-header-cell-" + index, className: headingClassName }, columnProps), label)); | ||
var rowChildren = react_1.default.Children.map(children, function (column) { | ||
if (typeof column === "boolean" || column === null) { | ||
return null; | ||
} | ||
var _a = column.props, label = _a.label, render = _a.render, headingClassName = _a.headingClassName, onClick = _a.onClick, sortDirection = _a.sortDirection, sortable = _a.sortable, columnProps = __rest(_a, ["label", "render", "headingClassName", "onClick", "sortDirection", "sortable"]); | ||
@@ -73,0 +79,0 @@ return (react_1.default.createElement(morse_react_1.TableCell, __assign({ key: "table-cell-row-" + index + "-column-" + label }, columnProps), linkTo === undefined ? (render(item)) : (react_1.default.createElement(react_router_dom_1.Link, { style: { |
{ | ||
"name": "morse-react-tables", | ||
"version": "0.12.6", | ||
"version": "0.12.10", | ||
"description": "Patterns for building tables", | ||
@@ -40,3 +40,3 @@ "repository": { | ||
], | ||
"gitHead": "d6ad8d575b644094459d17bac4835b977eb9e787" | ||
"gitHead": "8cce7248341e94e2dd317110dd9c03a1f43d4df2" | ||
} |
Sorry, the diff of this file is not supported yet
31606
452