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: Empty column causes maximum recursive calls to be reached #5053

Closed
CodeNamedRobin opened this issue Jan 9, 2024 · 3 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@CodeNamedRobin
Copy link

Describe the bug

The following component gives a ERRORDING

<template>
  <DataTable>
    <Column/>
  </DataTable>
</template>

Providing a field fixes the issue.

<template>
  <DataTable>
    <Column field="" />
  </DataTable>
</template>

Reproducer

https://codesandbox.io/p/devbox/old-silence-7j7hlh

PrimeVue version

3.46.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Make DataTable with empty column
  2. It dies
  3. Add field
  4. It doesn't die

Expected behavior

Page doesn't die.

@CodeNamedRobin CodeNamedRobin added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 9, 2024
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 11, 2024
@mertsincan mertsincan self-assigned this Jan 11, 2024
@mertsincan mertsincan added this to the 3.47.0 milestone Jan 11, 2024
@mertsincan
Copy link
Member

Thanks a lot for your report! I'll fix it in the next version.

@richardshergold
Copy link

richardshergold commented Jan 12, 2024

It's not just empty columns that cause this error. I have a column that just displays a button in it and I get the error too:

<Column>
            <template #body="{ data }">
                <button class="view-button" @click="useScheduledMessage(data.id)">View</button>
            </template>
</Column>

The error goes away if I add an empty header e.g

<Column header="">
            <template #body="{ data }">
                <button class="view-button" @click="useScheduledMessage(data.id)">View</button>
            </template>
</Column>

@mertsincan
Copy link
Member

Fixed in #5069

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

3 participants