Merge pull request #144 from SilbinaryWolf/fix-doc-editablecallback

fix(Documentation): Updated to show third case of needing a custom title and a callback
This commit is contained in:
Marcus 2016-04-20 13:34:03 +10:00
commit ec455b8cf5

View File

@ -44,6 +44,12 @@ $grid->getConfig()->getComponentByType('GridFieldEditableColumns')->setDisplayFi
'SecondField' => array( 'SecondField' => array(
'title' => 'Custom Title', 'title' => 'Custom Title',
'field' => 'ReadonlyField' 'field' => 'ReadonlyField'
),
'ThirdField' => array(
'title' => 'Custom Title Two',
'callback' => function($record, $column, $grid) {
return TextField::create($column);
}
) )
)); ));
``` ```