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: Warning message related to props displayed #7470

Open
redonearth opened this issue Dec 3, 2024 · 1 comment
Open

DataTable: Warning message related to props displayed #7470

redonearth opened this issue Dec 3, 2024 · 1 comment
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@redonearth
Copy link
Contributor

Describe the bug

To set the default props of the DataTable component, I created a component called StyledDataTable and am using it in my project. I'm not sure when, but a warning message that was clearly invisible appears in the console.
I discovered it after updating to Vite 6, but the phenomenon is the same even after downgrading to version 5.4.11.
This is a fact I discovered while writing code to reproduce the bug.
This was caused by code injecting props from <DataTable {...props}>.
I created the same StyledDataTable component in the bug reproduction code, but I couldn't see the warning message in the StackBlitz console.

image
image
image

Reproducer

https://stackblitz.com/edit/vitejs-vite-xxihnm?file=src%2FStyledDataTable.tsx

System Information

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 1.10 GB / 3.83 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
    Yarn: 4.5.3 - ~/.nvm/versions/node/v20.18.0/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
    bun: 1.1.26 - ~/.bun/bin/bun
  npmPackages:
    primereact: ^10.8.5 => 10.8.5
    react: ^18.3.1 => 18.3.1
    tailwindcss: ^3.4.15 => 3.4.15

Steps to reproduce the behavior

It should happen just by loading the project.

Expected behavior

Warning messages should not appear in the console.

@redonearth redonearth 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 3, 2024
@redonearth redonearth changed the title DataTAble: Warning message related to props displayed DataTable: Warning message related to props displayed Dec 3, 2024
@AnisGhub
Copy link

AnisGhub commented Dec 16, 2024

Describe the bug

same problem here, lots of console errors when I add

 const footerGroup = (
    <ColumnGroup>
      <Row>
        <Column footer="test1:"  />
        <Column footer="test2" />
        <Column footer="test3" />
      </Row>
    </ColumnGroup>
  );
   <DataTable
            value={values}
            dataKey="_id"
            selection={selectedValues}
            onSelectionChange={handleSelectionChange}
            selectionMode="multiple"
            isDataSelectable={isRowSelectable}
            rowClassName={rowClassName}
            // paginator
            paginator={true}
            lazy={true}
            rows={ROWS_PER_PAGE}
            totalRecords={valuesCount}
            onPage={handlePageChange}
            emptyMessage="empty table"
            footerColumnGroup={footerGroup}
          >

Capture d’écran du 2024-12-16 10-46-37

Capture d’écran du 2024-12-16 10-47-25

System Information
OS: ubuntu 22.04.05

package.json
"primeflex": "^3.3.1",
"primeicons": "^7.0.0",
"primereact": "^10.8.5",

Expected behavior
Warning messages should not appear in the console.

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. 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 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

3 participants