mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
FIX Allow editing extra fields from ManyManyThroughList.
This commit is contained in:
parent
1284046e10
commit
47171ee4c2
@ -24,6 +24,7 @@ use SilverStripe\ORM\DataList;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\DataObjectInterface;
|
||||
use SilverStripe\ORM\ManyManyList;
|
||||
use SilverStripe\ORM\ManyManyThroughList;
|
||||
|
||||
/**
|
||||
* Allows inline editing of grid field records without having to load a separate
|
||||
@ -165,7 +166,7 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
|
||||
}
|
||||
}
|
||||
|
||||
if ($list instanceof ManyManyList) {
|
||||
if ($list instanceof ManyManyList || $list instanceof ManyManyThroughList) {
|
||||
$extra = array_intersect_key($form->getData() ?? [], (array) $list->getExtraFields());
|
||||
}
|
||||
|
||||
@ -250,7 +251,7 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
|
||||
}
|
||||
}
|
||||
|
||||
if (!$field && $list instanceof ManyManyList) {
|
||||
if (!$field && ($list instanceof ManyManyList || $list instanceof ManyManyThroughList)) {
|
||||
$extra = $list->getExtraFields();
|
||||
|
||||
if ($extra && array_key_exists($col, $extra ?? [])) {
|
||||
|
Loading…
Reference in New Issue
Block a user