primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Clicking on a checkbox in a DataTable sortable column header changes sorting

Open ctrl-brk opened this issue 9 years ago • 4 comments

I'm submitting a ... (check one with "x")

[x] bug report

Current behavior Trying to use p-checkbox in a filter template for sortable column in a DataTable. Clicking on a checkbox also sorts data.

Expected behavior Checkbox should not propagate click event to its parent.

Minimal reproduction of the problem with instructions Add

<ng-template pTemplate="filter" let-col>
   <p-checkbox binary="true"></p-checkbox>
</ng-template>

to a sortable DataTable column and click on it.

  • Angular version: 2.4.6

  • PrimeNG version: 4.1.0-rc.3

  • Browser: [all ]

ctrl-brk avatar Jul 11 '17 22:07 ctrl-brk

@ctrl-brk Could you please add your code's related parts to plunkr and share the link with us?

SefaMuratcanKatirci avatar Jul 14 '17 07:07 SefaMuratcanKatirci

Do you have some DataTable plunker I can start with?

ctrl-brk avatar Jul 17 '17 15:07 ctrl-brk

No, but you can fork PrimeNG , and open it as a project. Then, you should follow the directions in our Wiki page. While you are cloning do not forget to write your username instead of primafaces (e.g. crtl-brk/primeng instead of primefaces/primeng)

You can do lots of trials about all of primeng components there.

SefaMuratcanKatirci avatar Jul 18 '17 07:07 SefaMuratcanKatirci

Provide a plunkr please;

http://plnkr.co/edit/Qi2Nw2imLpDUF8NJinYw?p=preview

cagataycivici avatar Aug 23 '17 08:08 cagataycivici