Browse Source

Make expand row explicit

By removing the onclick handler on the table row, clicking any button in the row does not fire the onclick handler of the row as well.
This has the effect that for expanding the row you need to click the expand button.
upload-correct-windows-binary
Philipp Hoenisch 3 years ago
parent
commit
9fa9bed4b3
No known key found for this signature in database GPG Key ID: E5F8E74C672BC666
  1. 5
      frontend/src/components/cfdtables/CfdTable.tsx

5
frontend/src/components/cfdtables/CfdTable.tsx

@ -65,7 +65,7 @@ export function CfdTable(
id: "expander",
Header: () => null,
Cell: ({ row }: any) => (
<span {...row.getToggleRowExpandedProps()}>
<span>
{row.isExpanded
? <IconButton
aria-label="Reduce"
@ -319,9 +319,6 @@ export function Table({ columns, tableData, hiddenColumns, renderDetails }: Tabl
<React.Fragment key={row.id}>
<Tr
{...row.getRowProps()}
onClick={() =>
// @ts-ignore
row.toggleRowExpanded()}
>
{row.cells.map((cell) => (
// @ts-ignore

Loading…
Cancel
Save