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

Comments in ColumnGroup rows are rendered as <th> elements #1368

Closed
ltlBeBoy opened this issue Jul 9, 2021 · 0 comments
Closed

Comments in ColumnGroup rows are rendered as <th> elements #1368

ltlBeBoy opened this issue Jul 9, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ltlBeBoy
Copy link

ltlBeBoy commented Jul 9, 2021

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

[X ] bug report
[ ] feature request
[ ] support request

Current behavior
primevue/src/components/datatable/TableHeader.vue renders comments in ColumnGroup rows as th. This is because there is a loop over the row children which does not check whether the child is a Column or not.

Expected behavior
Comments are ignored when rendering.

Minimal reproduction of the problem with instructions
The following example will render seven instead of five columns:

    <ColumnGroup type="header">
      <Row>
        <Column header="A" :rowspan="2" />
        <Column header="B" :colspan="2" />
        <Column header="C" :colspan="2" />
      </Row>
      <Row>
        <!-- Comment B -->
        <Column header="B1" />
        <Column header="B2" />

        <!-- Comment C -->
        <Column header="C1" />
        <Column header="C1" />
      </Row>
    </ColumnGroup>

What is the motivation / use case for changing the behavior?
Bugfix.

Please tell us about your environment:
Debian Linux 9; Visual Studio Code 1.57.1; Firefox 78.11.0esr (64-Bit)

  • Vue version: 3.1.2

  • PrimeVue version: 3.5.1

  • Browser: all

@tugcekucukoglu tugcekucukoglu added this to the 3.5.2 milestone Jul 16, 2021
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 16, 2021
@tugcekucukoglu tugcekucukoglu self-assigned this Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants