-
Notifications
You must be signed in to change notification settings - Fork 821
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENHANCEMENT Support multiple search fields in GridFieldRelationAdd, a…
…nd allowing custom result formatting (SSF-53)
- Loading branch information
Showing
1 changed file
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a2afe4e
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.
@chillu Hey Ingo, I'm doing some research into the history of the GridState and have come across some issues with
findSingleEntry
not working (or ever being called). It looks as though this commit changed the API slightly.If you look at
silverstripe-framework/forms/gridfield/GridFieldRelationAdd.php
Line 206 in a2afe4e
silverstripe-framework/forms/gridfield/GridFieldRelationAdd.php
Line 56 in a2afe4e
My question is, for 3.2, can we completely drop the following? they are (as far as I can tell) extraneous.
I've done a quick test with the above stripped out and it seems to work fine. If you don't have any complaints, I'll include the above simplifications in a part of a larger PR with a few other GridField fixes.
a2afe4e
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.
Hey Damian, the behaviour is frankly a bit confusing to me without trying it out in depth.
findSingleEntry
doesn't seem to have any effect other than setting the search field text, which seems unnecessary given we have $.autocomplete showing a list of results underneath the search field. I haven't looked into how the actual adding is handled via the JS, but as long as we can retain that base functionality I'm fine with removing the things you mentioned.