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

Add searchable and sortable relation columns #573

Closed

Conversation

cwieken
Copy link

@cwieken cwieken commented Aug 8, 2023

I have implemented the feature to define foreign key columns (relation columns) to be used for searching and sorting in list view.

This should also cover discussion #514.

@cwieken cwieken force-pushed the searchable-and-sortable-relation-columns branch from 69de538 to ada2a08 Compare August 8, 2023 17:50
@anton-petrov
Copy link
Contributor

@aminalaee
I tested this pull request on my production service - everything works correctly, so you can safely merge this PR.

Copy link
Owner

@aminalaee aminalaee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, but I think it'd be easier to discuss the approach first in the issue/discussion before doing it.
I think it's ideal if we could keep the config in the same one i.e. doing this:

class UserAdmin(...):
    column_sortable_list = ["address.street"]

Instead of introducing a new config for this, but not sure how much effort it is so I will take look and let you know.

@aminalaee
Copy link
Owner

This is already implemented with a different API.

@aminalaee aminalaee closed this Nov 5, 2023
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

Successfully merging this pull request may close these issues.

3 participants