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

Allow to apply sorting and filtering on ReferenceOneField #8304

Closed
nicgirault opened this issue Oct 25, 2022 · 2 comments · Fixed by #8306
Closed

Allow to apply sorting and filtering on ReferenceOneField #8304

nicgirault opened this issue Oct 25, 2022 · 2 comments · Fixed by #8306

Comments

@nicgirault
Copy link
Contributor

nicgirault commented Oct 25, 2022

The doc currently says:

This field fetches a one-to-one relationship, e.g. the details of a book, when using a foreign key on the distant resource.

But actually it could be used to display only one record of many references (eg the latest reference of a record). To choose the right record to display, filtering & sorting might be useful. For example, to get the latest reference, I would like to sort DESC on a createdAt field. But I can't because the ASC order is hard coded here.

Would you accept a PR on this feature?

@WiXSL
Copy link
Contributor

WiXSL commented Oct 25, 2022

Of course, PRs are always welcome

@fzaninotto
Copy link
Member

Fixed by #8306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants