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

ListDecorator and PaginatedList shouldn't return the inner list #11387

Open
GuySartorelli opened this issue Sep 17, 2024 · 0 comments
Open

ListDecorator and PaginatedList shouldn't return the inner list #11387

GuySartorelli opened this issue Sep 17, 2024 · 0 comments

Comments

@GuySartorelli
Copy link
Member

Most methods in ListDecorator (and subsequently in PaginatedList and any other subclass of ListDecorator) return the inner list instead of returning itself - e.g. ListDecorator::filter() returns the inner list.

Instead, these should do one of the following:

  1. Make a clone of itself, set the inner list of the clone to be the result of the filter/sort/etc, and return the clone
  2. Set its own inner list to be the result of the filter/sort/etc and return itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant