Skip to content

Commit 445b0b9

Browse files
committed
add check for closure in options
1 parent 7c21aec commit 445b0b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/BaseColumn.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ private function normalize($name) {
228228
*/
229229
public function renderInput($name, $options)
230230
{
231+
if ($this->options instanceof \Closure) {
232+
$this->options = call_user_func($this->options, $this->getModel());
233+
}
234+
231235
$options = Arrayhelper::merge($this->options, $options);
232236
$method = 'render' . Inflector::camelize($this->type);
233237
$value = $this->prepareValue();

0 commit comments

Comments
 (0)