Duplicated header in Scrollable p:datatable

UI Components for JSF
venturus
Posts: 7
Joined: 27 Aug 2013, 13:58

15 Oct 2014, 19:20

Hello,


Since I migrated to Primefaces 5.1, I am facing a strange issue. The header of my datatable is appearing twice.

You can reproduce the error with the code below.

Code: Select all

<p:dataTable value="#{myBean.myList}" scrollable="true">
			<p:column headerText="Column 1"> Value 1 </p:column>
		</p:dataTable>

Is it a bug or am I missing smt? If you can reproduce it just let me know... so I can open an issue.
Primefaces 5.1
Extensions 2.0.0
Atmosphere 2.2.3

User avatar
ademkursatuzun
Posts: 21
Joined: 08 Apr 2013, 13:22

16 Oct 2014, 14:27

Probably, you're missing something because showcase running on 5.1. check again here http://www.primefaces.org/showcase/ui/d ... asic.xhtml
PrimeFaces 5.2 !|! Glassfish 4.0 !|! Mojarra 2.2.0 /
Mac Os X !|! Firefox 32.0
_______________________________________/
root@server:~f LLLSDLaserControl -ck 1 ]

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

16 Oct 2014, 15:41

ademkursatuzun wrote:Probably, you're missing something because showcase running on 5.1. check again here http://www.primefaces.org/showcase/ui/d ... asic.xhtml
You mean http://www.primefaces.org/showcase/ui/d ... roll.xhtml? Check if adding a scrollHeight makes a difference...

venturus
Posts: 7
Joined: 27 Aug 2013, 13:58

16 Oct 2014, 16:14

My bad.

I was checking for the generated HTML.

Structure looks like this:

Code: Select all

<div class="ui-datatable-scrollable-body">
    <table />
</div>
<div class="ui-datatable-scrollable-body">
  <table>
     <thead class="ui-datatable-scrollable-theadclone" />
  </table>
</div>
In my previous version (5.0.5) this <thead /> did not exist.

In 5.1 its hidden (height is set to 0), but I had a css that was overriding this height... so it was being displayed.

Thanks for your time,
Primefaces 5.1
Extensions 2.0.0
Atmosphere 2.2.3

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

16 Oct 2014, 18:35

Hmmm this might be for 'sticky header'... I hope not... I do not use sticky headers, so I do not want duplicate code... yuck...

mpasacrita
Posts: 4
Joined: 04 Mar 2013, 22:17

28 Apr 2015, 21:49

I'm also having this problem with scrollable data tables after switching to 5.2.1

If I remove the scrollable="true" option from the datatable tag, the duplicate header bar disappears.

If I add CSS to set the display to "none" for that duplicate header at the <thead> level, then the datatable's horizontal scrollbar disappears as well.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

29 Apr 2015, 08:58

New queztions in new topics please

mpasacrita
Posts: 4
Joined: 04 Mar 2013, 22:17

30 Apr 2015, 17:13

That wasn't a new question. It was me trying to provide extra information to help the PrimeFaces team troubleshoot.

scarsix06d
Posts: 18
Joined: 04 May 2011, 20:49

30 Apr 2015, 23:13

Hi! I have the same issue

I changed my css file

.ui-datatable-scrollable-theadclone th span.ui-column-title {
display: none !important;
height: 0px;
}

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

02 May 2015, 19:27

Clone header is required to align header and body for scrolling. You should not see clone though, I can't see it on showcase for example.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 45 guests