Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A table's rowClicked action does nothing #323

Open
MarkBracke opened this issue Jan 28, 2023 · 1 comment
Open

A table's rowClicked action does nothing #323

MarkBracke opened this issue Jan 28, 2023 · 1 comment

Comments

@MarkBracke
Copy link

MarkBracke commented Jan 28, 2023

const renderTableRow = (row, rowIndex, level, isLast) => {

Looks like rowClicked is a prop of a Table, but it was never implemented. Luckily, TableRow already implements onClick, so this suggested fix is quite simple:

<TableRow
    className={row && row.classList ? row.classList : ''}
    hasClickAction={hasClickAction}
    level={level}
    isLast={isLast}
    onClick={(e) => rowClicked && rowClicked(row, e)}
>

Why include the event? Because it's sometimes useful to know if the user clicked the mouse while holding Ctrl or Shift.

@TriangleJuice
Copy link
Contributor

Hi Mark, thanks for the suggestion. At the moment we're working on a big upgrade and we will certainly take your remark into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants