row click and column selection checkbox not working as expected

UI Components for Vue
Post Reply
maxacarvalho
Posts: 1
Joined: 04 May 2022, 11:48

11 May 2022, 22:35

Hi,

What I'm trying to do is to attach a row click event to the datatable so I can go to the row detail on mouse click.
At the same time, I want to be able to use checkboxes to select table rows.

The problem is that when I try to unselect the checkbox of a row the onClick event is triggered.

Code exemple:

Code: Select all

...
<Datatable data-key="id" :selection.sync="selection" @row-click="onRowClick($event)">
    <Column selection-mode="multiple" :header-style="{'width': '3em'}" />
</Datatable>
...

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

09 Jun 2022, 16:45

Do you have a codeesandbox link? I can't see any code and could not replicate it.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests