I have a button I don't want that works and a menu item I want that doesn't work
take those two examples in the docs and squash them together. I noticed the latter one is a GridFieldCustomAction too, with an extra interface added
won't have time to test out until later
// ...rest of boilerplate code
yeah, that. Take all the methods from the first example and put them in the second, after that line
that's what I'm going to try when I get the chance 😛
@null I think I've cracked it.
getExtraData() behaves well when it returns the attributes of a form action.
GridFieldDeleteAction::getExtraData() is a good example of this.
If you follow the docs, the action menu item created will be useless. But if
GridFieldCustomAction::getExtraData() returns the attributes of a
GridField_FormAction, it behaves as expected
You can become a legend in the framework git history
Updated the How to add a custom action to a GridField row with more details surrounding creating an action in the GridField action menu dropdown, as well as the corresponding boilerplate (with code...Hide attachment content