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 multiple ajax sorts and changes to result size #805

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

mfriedy
Copy link
Contributor

@mfriedy mfriedy commented Aug 20, 2024

Allow the passing of multiple columns into the order_by field of form_ajax_refs, and also allow the passing of a limit parameter, rather than always using the default.

This allows configurations such as

    form_ajax_refs = {
        "order": {
            "fields": ("country_id", "user_id", "order_date"),
            "order_by": ["user_id", "order_date"],
            "limit": 50,
        }
    }

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.

Thanks for the PR. Can you please add some unit tests for your change?

@aminalaee aminalaee force-pushed the form_ajax_refs_multi_sort_filter branch from cf38ec9 to 9a4cc5f Compare September 5, 2024 19:54
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.

Thanks for the PR

@aminalaee aminalaee merged commit 4004ad0 into aminalaee:main Sep 5, 2024
5 checks passed
@aminalaee aminalaee mentioned this pull request Sep 6, 2024
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.

2 participants