Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: support headerRow in combination with frozenColumns #9572

Closed
nimo23 opened this issue Jan 1, 2023 · 6 comments
Closed

DataTable: support headerRow in combination with frozenColumns #9572

nimo23 opened this issue Jan 1, 2023 · 6 comments
Labels
Resolution: Wontfix Issue will not be fixed due to technical limitations sponsoring required This issue requires financial sponsoring through PrimeTek PRO support

Comments

@nimo23
Copy link
Contributor

nimo23 commented Jan 1, 2023

Describe the bug

This reproducer demonstrates the following issues when dataTable has frozenColumns in combination with headerRow:

  • The dataTable has two headerRows.
  • The toggle toggles the frozen and unfrozen part separately.

Reproducer

primefaces-test-jakarta.zip

Expected behavior

  • The dataTable should have only one headerRow (if activated).
  • The toggle should toggle the whole rows (belonging to the group)

PrimeFaces edition

Community

PrimeFaces version

13

Theme

No response

JSF implementation

Mojarra

JSF version

4

Java version

17

Browser(s)

Firefox 115

@nimo23 nimo23 added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Jan 1, 2023
@melloware melloware added discussion Item needs to be discussed by core devs Resolution: Wontfix Issue will not be fixed due to technical limitations and removed 🐞 defect Bug...Something isn't working ‼️ needs-triage Issue needs triaging labels Jan 2, 2023
@melloware
Copy link
Member

I am pretty sure this is not allowed. Frozen columns was not designed for this use case it was meant for a very specific case.

PrimeTek's answer this in the past has been "not all features of the datatable are designed to work together" and I think this is the case here.

@tandraschko @Rapster can chime in here but I don't this would be addressed by the community and only through PRO support request to PrimeTek.

@melloware melloware changed the title dataTable: issues with headerRow in combination with frozenColumns DataTable: issues with headerRow in combination with frozenColumns Jan 2, 2023
@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2023
@tandraschko tandraschko added the sponsoring required This issue requires financial sponsoring through PrimeTek PRO support label Jan 3, 2023
@nimo23
Copy link
Contributor Author

nimo23 commented Jan 3, 2023

@melloware Can you reopen this issue?

I looked briefly into the html code how PF constructs its fixed columns. It seems it duplicates the rows (which needs to be frozen=sticky) and appends thows rows to the origin table. Maybe we can find a solutions solely with css position: sticky; so that all columns which needs to be frozen adds a css class "column-sticky". However, I don't know if such simple solution is sufficient as PF dataTable can have other requirements why it duplicates its (frozen) columns..

If we can replace the PF implementation of frozenColumns by position: sticky; instead of adding duplicate rows (to imitate sticky columns), then this issue can be resolved more easily (because we do not have two headerRows afterwards and can also use position: sticky; for the headerRow..

@nimo23 nimo23 changed the title DataTable: issues with headerRow in combination with frozenColumns DataTable: support headerRow in combination with frozenColumns Jan 3, 2023
@melloware
Copy link
Member

melloware commented Jan 3, 2023

position:sticky won't work. See: #6410

There is too much dynamic JS code involved and position sticky requires a static top value.

@melloware melloware added new feature and removed Resolution: Wontfix Issue will not be fixed due to technical limitations discussion Item needs to be discussed by core devs labels Jan 3, 2023
@melloware melloware reopened this Jan 3, 2023
@nimo23
Copy link
Contributor Author

nimo23 commented Jan 3, 2023

position sticky requires a static top value.

But the static top can be calculated within css, or? Maybe adding inline style to the dedicated component by js with something like:

postion: sticky;
top: calc(0 + 140px);

@melloware
Copy link
Member

You can try it!

@melloware
Copy link
Member

@nimo23 its been months since our last conversation on this ticket and I see you made no progress. For now I will mark as not supported but will be happy to re-open if you provide a PR.

@melloware melloware added Resolution: Wontfix Issue will not be fixed due to technical limitations and removed new feature labels Jan 3, 2024
@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Wontfix Issue will not be fixed due to technical limitations sponsoring required This issue requires financial sponsoring through PrimeTek PRO support
Projects
None yet
Development

No branches or pull requests

3 participants