Skip to content

Commit 130de1e

Browse files
FIX: unique ID attribute for ManyRelationHandler
ManyList version of 1ab7bac
1 parent 1ab7bac commit 130de1e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gridfield/GridFieldManyRelationHandler.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ public function getColumnContent($gridField, $record, $columnName) {
1818

1919
$state = $this->getState($gridField);
2020
$checked = in_array($record->ID, $state->RelationVal->toArray());
21-
$field = array('Checked' => $checked, 'Value' => $record->ID, 'Name' => $this->relationName($gridField));
21+
$field = array(
22+
'Checked' => $checked,
23+
'Value' => $record->ID,
24+
'Name' => $this->relationName($gridField),
25+
'ID' => $record->ID
26+
);
2227
if($list instanceof HasManyList) {
2328
$key = $record->{$this->cheatList->getForeignKey($list)};
2429
if($key && !$checked) {

0 commit comments

Comments
 (0)