@agilant/toga-blox 1.0.180 → 1.0.181
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.
|
@@ -31,7 +31,15 @@ const TableRow = ({ row, prepareRow, activeIndex, activeRowColor = "bg-pink-100"
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
// Fix: Key is discarded from the spread obj, react still gets key just not from spread i.e. key={rowUuid}
|
|
35
|
+
// Pull props ahead of time and separate out 'key'
|
|
36
|
+
// If row.getRowProps exists, call function, else use empty obj
|
|
37
|
+
// _ignoredKey extracts the key prop and stores it, it will be discarded
|
|
38
|
+
// ...safeRowProps gathers remaining props except key into obj using '...'
|
|
39
|
+
const { key: _ignoredKey, ...safeRowProps } = row.getRowProps
|
|
40
|
+
? row.getRowProps()
|
|
41
|
+
: {};
|
|
42
|
+
return (_jsxs(Fragment, { children: [_jsx("tr", { "data-testid": "table-row", className: `border-b border-b-navy-200 ${rowHoverClasses} ${rowClasses} ${rowClassNames}`, onClick: handleRowClick, ...safeRowProps, children: row.cells.map((cell, idx) => {
|
|
35
43
|
const cellKey = `${rowUuid ?? "no-uuid"}-${cell.column.id}`;
|
|
36
44
|
return (_jsx(TableCell, { cell: cell, isLastCell: idx === row.cells.length - 1, hasInfiniteScroll: hasInfiniteScroll, rowUuid: rowUuid, expanded: expandedCells[cellKey] ?? false, onToggle: () => toggleCell(cellKey), linkText: linkText }, cellKey));
|
|
37
45
|
}) }, rowUuid), hasDropDown && (_jsx(AnimatePresence, { children: isExpanded && (_jsx("tr", { "data-testid": "expanded-row", children: _jsx("td", { colSpan: row.cells.length, className: "p-0", children: _jsx(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: "auto", opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.3 }, className: "overflow-hidden w-full", children: isLoading ? (loadingIndicator ?? (_jsx("span", { children: "Loading..." }))) : error ? (errorIndicator ? (errorIndicator(error)) : (_jsxs("span", { className: "text-red-700", children: ["Error: ", error.message] }))) : (expandedContent ?? (_jsxs("span", { children: ["drop down \u2013 ", rowUuid] }))) }, "expanded-dropdown-content") }) })) }))] }));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agilant/toga-blox",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.181",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"tslib": "^2.3.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@fortawesome/fontawesome-svg-core": "^6.
|
|
51
|
-
"@fortawesome/free-solid-svg-icons": "^6.
|
|
50
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
51
|
+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
52
52
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
53
53
|
"@sentry/react": "^8.55.0",
|
|
54
54
|
"@storybook/addon-a11y": "^7.6.8",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"nodemon": "^3.0.2",
|
|
78
78
|
"postcss": "^8.4.32",
|
|
79
79
|
"react-hook-form": "^7.43.9",
|
|
80
|
-
"react-router-dom": "^6.
|
|
80
|
+
"react-router-dom": "^6.30.1",
|
|
81
81
|
"sass": "^1.84.0",
|
|
82
82
|
"storybook": "^7.6.6",
|
|
83
83
|
"tailwindcss": "^3.4.0",
|