Skip to content

fix: coerce accessor key to string during column creation#4835

Closed
jpedroh wants to merge 1 commit into
TanStack:mainfrom
jpedroh:fix/gh_4815
Closed

fix: coerce accessor key to string during column creation#4835
jpedroh wants to merge 1 commit into
TanStack:mainfrom
jpedroh:fix/gh_4815

Conversation

@jpedroh

@jpedroh jpedroh commented May 2, 2023

Copy link
Copy Markdown
Contributor

During render, if the accessorKey was not a string, e.g. a number, it would result in an error when trying to normalize it during column creation, because it was trying to access methods which are not available in a number (replace and include). This PR forces the accessor key to be constructed as a string during column creation, thus removing this bug.

fixes #4815

@jpedroh
jpedroh marked this pull request as draft May 2, 2023 12:49
@jpedroh
jpedroh marked this pull request as ready for review May 2, 2023 13:16
@jpedroh jpedroh closed this by deleting the head repository Jul 25, 2023
@schardev

Copy link
Copy Markdown

hey @jpedroh, was there any issues with your PR? If not can you reopen it?

@jpedroh

jpedroh commented Nov 18, 2024

Copy link
Copy Markdown
Contributor Author

hi @schardev!

to be fair, I don't fully recall if there was any issue with the PR. I just don't have the original source code anymore unfortunately, so feel free to open a new one with this implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Array index as an accessorKey in ColumnDef does not work

2 participants