Fix ability to clear RecodFinder when useRelation = false (#4256)
Fixes #4255. Credit to @SeriousKen
This commit is contained in:
parent
7189cc7fcb
commit
38070b0111
|
|
@ -264,7 +264,9 @@ class RecordFinder extends FormWidgetBase
|
|||
return null;
|
||||
}
|
||||
|
||||
return $this->relationModel->{$this->keyFrom};
|
||||
return $this->useRelation ?
|
||||
$this->relationModel->{$this->keyFrom} :
|
||||
$this->formField->value;
|
||||
}
|
||||
|
||||
public function getNameValue()
|
||||
|
|
|
|||
Loading…
Reference in New Issue