You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is caused by ReferenceOneField having a default prop source of "id", so when the default sort is on the id field, the datagrid header thinks it is sorted by this field.
What you were expecting:
Adding a
sort
prop to a<Field>
in a<Datagrid>
doesn't mess up with the datagrid headerWhat happened instead:
React-admin gets confused about the actual sort order and shows more than one sort arrow
Steps to reproduce:
I used the new capacity of
<ReferenceOneField>
to work on a one-to-many relationship, introduced in #8306:This results in two arrows being shown in the datagrid header, even before I choose one:
CodeSandbox
https://codesandbox.io/s/distracted-mayer-jj8pjf?file=/src/posts/PostList.tsx
I noticed the bug doesn't occur when I set the
sort
prop on the<List>
Environment
The text was updated successfully, but these errors were encountered: