-
Notifications
You must be signed in to change notification settings - Fork 823
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
ENH: Scaffold GridFieldFilterHeader filters for ArrayList based GridFields. #11575
base: 5
Are you sure you want to change the base?
ENH: Scaffold GridFieldFilterHeader filters for ArrayList based GridFields. #11575
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested yet, but a few (mostly minor) things stood out in a quick review
// In case we are working with an ArrayList we need to conver the search context into a basic search context | ||
// This is because the scaffolded filters are inteded to use ORM for data searching, | ||
// they rely on DataList functionality which is not avaialble on an ArayList | ||
if ($list instanceof ArrayList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($list instanceof ArrayList) { | |
if (!($list instanceof DataList)) { |
Allows for other list implementations that don't use the database (e.g. EagerLoadedList
but also project-specific implementations people may make)
There is a failed unit test that seems relevant - can you please take a look?
|
Description
Enables filtering capability for cases where GirdField data is stored in an
ArrayList
. This wasn't working before because pre CMS 5 such feature was not supported. With CMS 5 it's possible so we should enable it.Issues
Likely replaces tractorcow-farm/silverstripe-fluent#922
Pull request checklist