primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Sort event should not be triggered if target is clickable

Open tamatcho opened this issue 10 years ago • 4 comments

Hi, I have a MultiSelect as template in a datable column header and the column is also sortable,but when clicking to drop down the menu it also sorts the table. Is there a way to separate both use cases?

tamatcho avatar Sep 26 '16 12:09 tamatcho

adding (click)="onFilterInputClick($event)" on MultiSelect or regular select prevents sorting.

lbamburski avatar Sep 26 '16 13:09 lbamburski

thanks for the advice but it still not working, I'm getting the exception 'self.context.onFilterInputClick' is undefined as shown in the attached screenshot. screen shot 2016-09-26 at 15 58 35

tamatcho avatar Sep 26 '16 14:09 tamatcho

I was editing Datatable template and put that click event there. Outside of datatable that method doesn't exist.

lbamburski avatar Sep 26 '16 14:09 lbamburski

This should also happen when you add an input or button or anchor inside table header. We need to find a way to stop sorting in these cases.

cagataycivici avatar Sep 27 '16 15:09 cagataycivici