Skip to content

Commit 2c70207

Browse files
programmisEugene Tupikov
authored andcommitted
Can't add more on dependent dropdown
this part won't work if we use a widget like select2. could this be fixed maybe? #261 (comment)
1 parent b98aefd commit 2c70207

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/BaseColumn.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,14 +637,15 @@ protected function renderWidget($type, $name, $value, $options)
637637
$tabindex = isset($options['options']['tabindex']) ? $options['options']['tabindex'] : self::TABINDEX;
638638
unset($options['tabindex']);
639639

640+
$id = isset($options['id']) ? $options['id'] : $this->normalize($name);
640641
$model = $this->getModel();
641642
if ($model instanceof Model) {
642643
$widgetOptions = [
643644
'model' => $model,
644645
'attribute' => $this->name,
645646
'value' => $value,
646647
'options' => [
647-
'id' => $this->normalize($name),
648+
'id' => $id,
648649
'name' => $name,
649650
'tabindex' => $tabindex,
650651
'value' => $value
@@ -655,7 +656,7 @@ protected function renderWidget($type, $name, $value, $options)
655656
'name' => $name,
656657
'value' => $value,
657658
'options' => [
658-
'id' => $this->normalize($name),
659+
'id' => $id,
659660
'name' => $name,
660661
'tabindex' => $tabindex,
661662
'value' => $value

0 commit comments

Comments
 (0)