joaocarmo / react-smart-data-table

A smart data table component for React meant to be configuration free
https://joaocarmo.com/react-smart-data-table/
MIT License
88 stars 37 forks source link

Displaying duplicate columns when using 'header' props #39

Closed dmestacio closed 3 years ago

dmestacio commented 3 years ago

Expected Behavior

When using props 'headers' to override a column's header name, it should only change the name of the header.

Actual Behavior

It creates a duplicate of that same column. (See CO2 Reduced in attached photo)

Screenshot

Screen Shot 2021-04-13 at 11 16 12 PM

Edit

Getting this error:

Encountered two children with the same key, cO2Redcued. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

PS. The entire team really likes your table, btw! We're using it for a class project and it really helped save us some time. Thank you!!

joaocarmo commented 3 years ago

@dmtapia, it's really good to know you and your team like this project!

Can you tell me which version are you currently using?

joaocarmo commented 3 years ago

Nevermind. I was able to replicate the issue using the latest version.

I added a fix in v0.11.0. Try it out and let me know if you find something amiss.