Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
34 lines
917 B
Plaintext
34 lines
917 B
Plaintext
import { jsx as _jsx } from "react/jsx-runtime";
|
|
export const OrderableRow = ({
|
|
cellMap,
|
|
columns,
|
|
dragAttributes = {},
|
|
dragListeners = {},
|
|
rowId,
|
|
...rest
|
|
}) => /*#__PURE__*/_jsx("tr", {
|
|
...rest,
|
|
children: columns.map((col, colIndex) => {
|
|
const {
|
|
accessor
|
|
} = col;
|
|
// Use the cellMap to find which index in the renderedCells to use
|
|
const cell = col.renderedCells[cellMap[rowId]];
|
|
// For drag handles, wrap in div with drag attributes
|
|
if (accessor === '_dragHandle') {
|
|
return /*#__PURE__*/_jsx("td", {
|
|
className: `cell-${accessor}`,
|
|
children: /*#__PURE__*/_jsx("div", {
|
|
...dragAttributes,
|
|
...dragListeners,
|
|
children: cell
|
|
})
|
|
}, colIndex);
|
|
}
|
|
return /*#__PURE__*/_jsx("td", {
|
|
className: `cell-${accessor}`,
|
|
children: cell
|
|
}, colIndex);
|
|
})
|
|
});
|
|
//# sourceMappingURL=OrderableRow.js.map |