Merge pull request #316 from chromos33/patch-1

Update index.md
This commit is contained in:
Steve Boyd 2021-03-19 12:30:45 +13:00 committed by GitHub
commit 6ee8d6ccb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -37,13 +37,13 @@ You can customise the form fields that are used in the grid by calling `setDispl
inline editing component. By default field scaffolding will be used.
```php
$grid->getConfig()->getComponentByType('GridFieldEditableColumns')->setDisplayFields(array(
$grid->getConfig()->getComponentByType(GridFieldEditableColumns::class)->setDisplayFields(array(
'FirstField' => function($record, $column, $grid) {
return new TextField($column);
},
'SecondField' => array(
'title' => 'Custom Title',
'field' => 'ReadonlyField'
'field' => ReadonlyField::class
),
'ThirdField' => array(
'title' => 'Custom Title Two',