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

Arrow for sortorder not appearing on header with sortBy #2306

Closed
TomJannes opened this issue Sep 11, 2018 · 2 comments
Closed

Arrow for sortorder not appearing on header with sortBy #2306

TomJannes opened this issue Sep 11, 2018 · 2 comments

Comments

@TomJannes
Copy link
Contributor

TomJannes commented Sep 11, 2018

What you were expecting:
To see an arrow next to the sorted column header

What happened instead:
No arrow indicating the sort direction

Steps to reproduce:

<List title={<ListTitle/>} {...props} filters={<LotenFilter/>}>
    <Datagrid>
        <ReferenceField label="Prop1" source="projectId" reference="projects" sortBy="prop1">
            <TextField source="prop1"/>
        </ReferenceField>
        <TextField label="Prop2" source="prop2"/>
    </Datagrid>
</List>

Environment

  • React-admin version: 2.3.0
  • Last version that did not exhibit the issue (if applicable):
  • React version: 16.4.2
  • Browser: chrome
@TomJannes
Copy link
Contributor Author

If i put sortBy on the TextField instead of the ReferenceField, the arrow is visible but on sort it will use the source of the ReferenceField as sort field.

@trsteel88
Copy link

I'm having the same problem.

louisbl pushed a commit to louisbl/react-admin that referenced this issue Dec 1, 2018
Fixes arrow in sorted column header when the field use sortBy props.
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