dataTable, row select, row edit => error in datatable.js?

UI Components for JSF
kyakruu
Posts: 1
Joined: 29 Jan 2016, 12:51

29 Jan 2016, 12:54

However, onRowClick reacts only to td and span elements. ???
Ali

ApollonSkill
Posts: 7
Joined: 19 Aug 2016, 10:25

18 Oct 2016, 21:31

marco.delpercio wrote:Hi,

I just bumped into this thread because I have exactly the same issue. When trying to click to select a row nothing happens because some columns have their cells containing divs or other markup therefore the click event target is different and the row selection never happens.

I fixed it with the following workaround:

Code: Select all

jQuery(function () {
         jQuery('.ui-datatable-data').on('click', "td[role='gridcell']", function(event) {
		if (event.target.tagName.toLowerCase() != 'td')
		{
			jQuery(event.target).parents('td:first').trigger("click");
		}
	});
});
Currently using PF 5.2 community, on WildFlly 9.0.1, JSF Impl. Oracle Mojarra 2.2.11
Cheers
Thanks for your solution! it`s help me and it is also actual bug in PF 6.0.6 elite. But your solution helps to fix it. ;)
PrimeFaces 6.0.5 Elite, Layout omega 1.1.1.
Payara Server 163 (Based on GlassFish 4.1.1).
JSF 2.2.13(com.sun.faces).
Spring framework 4.3.1.RELEASE, Spring WebFlow 2.4.1.RELEASE, Spring Security 3.2.6.RELEASE.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 38 guests