Skip to content

Commit f36260d

Browse files
author
Eugene Tupikov
committed
retrieve relation data before processing
1 parent 6f7421f commit f36260d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/BaseColumn.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected function prepareValue($contextParams = [])
252252
if ($data instanceof ActiveRecordInterface ) {
253253
$relation = $data->getRelation($this->name, false);
254254
if ($relation !== null) {
255-
$value = $relation;
255+
$value = $relation->findFor($this->name, $data);
256256
} else {
257257
$value = $data->getAttribute($this->name);
258258
}
@@ -268,6 +268,7 @@ protected function prepareValue($contextParams = [])
268268
$value = $this->defaultValue;
269269
}
270270
}
271+
271272
return $value;
272273
}
273274

0 commit comments

Comments
 (0)