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 is not displayed if column name has [ or ] #187

Closed
statquant opened this issue Aug 20, 2021 · 2 comments
Closed

Data is not displayed if column name has [ or ] #187

statquant opened this issue Aug 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@statquant
Copy link

statquant commented Aug 20, 2021

Hello, the following breaks for me when trying to render a data.table but not a data.frame:

reactable(data.frame(x=1:3, y=1:3))     

image

reactable(data.frame(x=1:3, `y_[]`=1:3))

image

reactable(data.table(x=1:3, `y_[]`=1:3))

image

Many thanks for the package

@glin glin added the bug Something isn't working label Aug 22, 2021
@glin
Copy link
Owner

glin commented Aug 22, 2021

That's a good catch, thanks for the report. This is now fixed in the development version (f9b6c81):

  • Columns with square brackets ([ or ]) in their column name now render correctly (#187).

@glin glin closed this as completed Aug 22, 2021
@jonocarroll
Copy link

Just for reference, the same is/was true for a tibble and likely any structure which preserves [ in column names.

data.frame typically converts names with make.names() so this didn't come up so easily with those, but is there any interest in preserving column names through reactable()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants