diff --git a/web/src/components/DataTable.jsx b/web/src/components/DataTable.jsx
index 6523365..ccd6a13 100644
--- a/web/src/components/DataTable.jsx
+++ b/web/src/components/DataTable.jsx
@@ -29,7 +29,7 @@ function savePersisted(id, data) {
export default function DataTable({
id, columns, rows, getRowKey, rowClassName,
empty = "Nichts gefunden.", loading = false, toolbarExtra = null, tree = null,
- onVisibleRows = null,
+ onVisibleRows = null, onRowClick = null,
}) {
const colByKey = useMemo(() => Object.fromEntries(columns.map((c) => [c.key, c])), [columns]);
@@ -371,7 +371,9 @@ export default function DataTable({
{displayRows.map(({ row, depth, hasChildren }) => (
-
+
onRowClick(row, e) : undefined}
+ style={onRowClick ? { cursor: "pointer" } : undefined}>
{orderedCols.map((c) => (
|
{tree && treeActive && c.key === tree.column ? (
diff --git a/web/src/pages/Charges.jsx b/web/src/pages/Charges.jsx
index c7cf34c..1f567a7 100644
--- a/web/src/pages/Charges.jsx
+++ b/web/src/pages/Charges.jsx
@@ -178,6 +178,12 @@ export default function Charges() {
(selected.has(l.id) ? "row-active" : "")}
+ onRowClick={(l, e) => {
+ // Klicks auf Bedienelemente (Checkbox, Lagerort-Dropdown, Link) nicht
+ // als Zeilenauswahl werten – überall sonst die Zeile umschalten.
+ if (!e.target.closest("input, select, a, button, label")) toggle(l.id);
+ }}
getRowKey={(l) => l.id} empty="Keine Chargen im Bestand." />
|