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

unselectable prop causes runtime warnings #33

Open
ntwilson opened this issue Apr 29, 2022 · 1 comment
Open

unselectable prop causes runtime warnings #33

ntwilson opened this issue Apr 29, 2022 · 1 comment

Comments

@ntwilson
Copy link

When I make a table with unselectable: true, I get a warning from React:

Warning: Received true for a non-boolean attribute unselectable.
If you want to write it to the DOM, pass a string instead: unselectable="true" or unselectable={value.toString()}.

I'm using React & React-DOM v 17.0.2.

Would you consider changing unselectable to String? Or is there a reason that I should ignore the warning from React? It does appear that unselectable: true works, but unselectable: false doesn't. I'm guessing if the unselectable prop is present at all, it just sets it to not be selectable, despite the value you give it.
If the warning should be ignored, maybe you could consider changing unselectable to Unit, so it's more clear that it's mere presence is what affects the behavior?

@mjrussell
Copy link
Member

This seems like a bug and something we should probably fix to use the string, at least before its passed into react proper

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

No branches or pull requests

2 participants