-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
ArrayField sortable={false} console warnings #3157
Labels
Comments
Having this as well |
hey guys, I use ArrayField with Datagrid:
and now I see error on click column header:
is this related with topic issue? |
Reproduced and confirmed. |
fzaninotto
added a commit
that referenced
this issue
Apr 25, 2019
ghodsizadeh
pushed a commit
to ghodsizadeh/react-admin
that referenced
this issue
May 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
Adding sortable={false} in ArrayField component prints react warrnings in console (but it disables sorting)
console error
Warning: Received
false
for a non-boolean attributesortable
.If you want to write it to the DOM, pass a string instead: sortable="false" or sortable={value.toString()}.
If you used to conditionally omit it with sortable={condition && value}, pass sortable={condition ? value : undefined} instead.
Actually, in all cases if you put it like
<ArrayField source="categories" sortable}>
or
<ArrayField source="categories" sortable={true}>
it says it want non-boolean , but if you provide string - it says it wants boolean
(Warning: Failed prop type: Invalid prop
sortable
of typestring
supplied toEnhancedArrayField
, expectedboolean
.)What you were expecting:
Clean console
What happened instead:
http://prntscr.com/nfr89v
Steps to reproduce:
Environment
"react": "16.8.6",
"react-admin": "2.8.6",
The text was updated successfully, but these errors were encountered: