Closed danielsilva closed 8 months ago
Hey @danielsilva, thanks for opening this.
I was looking at the different options we have here, I think we could add a prop key
that can be used to specify the key for columns that don't use the dataKey
. I am a little hesitant to use the index as a fallback incase an application has an option to let the user show and hide columns.
What do you think?
:tada: This issue has been resolved in version 8.15.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Describe the bug
When no
dataKey
is passed a couple of warnings show up in the browser console:This requires fake
dataKey
values to be passed in for columns that do not have a specific data key to read its values from. One example is the actions columns that some tables can have, but another example is a column that implements a customcellFormatter
and displays a combination of values from multiple fields (e.g. a column that displays actual/expected quantities)The workaround of using fake
datakey
values prevents us from being able to assign Typescript constraints to the Table columns like the following:Steps to reproduce
Expected behaviour
No warnings are displayed in the browser console regarding empty
key
Is your team blocked from moving forward by the bug?
No
Who would you like to fix the bug?
Helpful resources
No response
Additional context
No response