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 or Column leak computed properties to their children through VirtualScroller #4924

Closed
Kotoriii opened this issue Dec 4, 2023 · 3 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Kotoriii
Copy link

Kotoriii commented Dec 4, 2023

Describe the bug

Using a DataTable > Column > Custom component structure like

<DataTable>
  <Column>
    <CustomComponent />
  </Column>
</DataTable>

Makes the custom component inherit implicit computed properties coming from the DataTable / Column Primevue components. This creates performance and name clashing issues.

Since CodeSandBox does not support Vue Dev Tools, I can only post screenshots of my local DevTools findings.

PrimeVue Component / (Inside DataTable->Column)
Screenshot 2023-12-04 at 13 23 50
Screenshot 2023-12-04 at 13 24 04

Custom Component (Inside Column)
Screenshot 2023-12-04 at 13 24 16
Screenshot 2023-12-04 at 13 24 22

The leaked properties seem to come from an implicit VirtualScroller inject
Screenshot 2023-12-05 at 10 24 41

It would be great to know why this happens and if it can be prevented in any way. I'm checking the vue 2 version, and this doesn't happen there.

Reproducer

N/A

PrimeVue version

3.15.0

Vue version

3.x

Language

ES6

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@Kotoriii Kotoriii added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 4, 2023
@Kotoriii Kotoriii changed the title DataTable or Column leak computed properties to their children DataTable or Column leak computed properties to their children through VirtualScroller Dec 5, 2023
@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 7, 2023
Copy link

github-actions bot commented Dec 7, 2023

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@luizzappa
Copy link

luizzappa commented Dec 10, 2023

I am facing this warning using the DataTable component which seems to be related to this issue.

image

The structure of my code is more or less like this:

        <DataTable 
            :globalFilterFields="['alias', 'licenseKey', 'usage', 'status']" 
            v-model:filters="filters"
            filterDisplay="menu"
        >
          <Column field="alias" header="Alias" sortable bodyStyle="width: 35%">
            <template #filter="{ filterModel }">
              <InputText v-model="filterModel.value" type="text" class="p-column-filter" placeholder="Search by alias" />
            </template>
          </Column>
        </DataTable >

My environment: nuxt + primevue (nuxt-primevue) + windows 10 + chrome.

The error never happens the first time I load the page, but if I navigate to another page and return, it appears
(sometimes I have to browse more than once to appear). It should happen when the component is already mounted on the client side.

@Kotoriii Kotoriii reopened this Dec 11, 2023
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Dec 18, 2023
@mertsincan mertsincan added this to the 3.45.0 milestone Dec 18, 2023
@mertsincan
Copy link
Member

The original issue has been fixed. For the other issue, please track #4745

Best Regards,

@mertsincan mertsincan self-assigned this Dec 21, 2023
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

4 participants