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

[data grid] Warnings displayed on browser console on duplicate columns names #16420

Open
narayanandebitos opened this issue Jan 31, 2025 · 1 comment
Labels
component: data grid This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information

Comments

@narayanandebitos
Copy link

We have observed when we import end user excel worksheet data and loaded into data grid pro component there are certain column names which are repeated. But it throws a lot warnings on browser console. why is this behavior ? and how to suppress the warnings ?

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 31, 2025
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Jan 31, 2025
@oliviertassinari oliviertassinari changed the title warnings displayed on browser console on duplicate columns names in data grid [data grid] Warnings displayed on browser console on duplicate columns names Jan 31, 2025
@MBilalShafi
Copy link
Member

MBilalShafi commented Feb 3, 2025

Hey @narayanandebitos, the Data Grid columns definition must have a unique value for the colDef.field property to uniquely identify each of the columns.

Could you expand on how are you importing the Excel data into the Data Grid? If you are using some kind of script to transform the data, make sure the field property doesn't repeat. You could instead use the headerName property to show different names on the view.

However, if you are using the unique values for the field and still seeing the warnings, I'd like to see a reproduction example. You can follow the steps here to prepare one: https://mui.com/x/introduction/support/#bug-reproductions

Let me know if you have further questions.

@MBilalShafi MBilalShafi added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

3 participants