silverstripe/silverstripe-cms — comment on commit d1581c2b9ba0edde03677414f1d556a30580f707
File:  line 0
By sminnee:

In general, this looks pretty good. The only comment I would make is that we've made it harder to replicate this functionality for other places where we want to create an external form for GridField.

One possible refactoring is to allow for a search context to be passed into a GridField, and for the GridField to provide a `SearchForm` accessor that would provide a Form object with the form action set appropriately. Of course, a search context might also be an appropriate way of specifying more complex options for the filter controls at the top of the form. The goal with GridField was to allow for different components that provide similar functionality in different ways, so an external-form-component would fit that model.

However, this refactoring isn't critical, and it might be best to wait until ModelAdmin is being implemented before going down that road.