Skip to content

Commit 902b06c

Browse files
committed
fix cache options for models
1 parent 445b0b9 commit 902b06c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/BaseColumn.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,12 @@ private function normalize($name) {
229229
public function renderInput($name, $options)
230230
{
231231
if ($this->options instanceof \Closure) {
232-
$this->options = call_user_func($this->options, $this->getModel());
232+
$optionsExt = call_user_func($this->options, $this->getModel());
233+
} else {
234+
$optionsExt = $this->options;
233235
}
234236

235-
$options = Arrayhelper::merge($this->options, $options);
237+
$options = Arrayhelper::merge($optionsExt, $options);
236238
$method = 'render' . Inflector::camelize($this->type);
237239
$value = $this->prepareValue();
238240

0 commit comments

Comments
 (0)