Closed maurice-pega closed 7 years ago
Why is this needed? One can always set the widget theme property directly instead of setting it via plugin options.
The idea was to initialize a widget as follows:
$this->form->field($someModel, 'somePropertyName')->widget(Select2::className(), [
'data' => $someSelectOptions,
'options' => [],
'pluginOptions' => [
'theme' => \kartik\widgets\Select2::THEME_BOOTSTRAP,
'allowClear' => true
]
])
... rather than overriding the theme property later. I thought this would be an intuitive way to do it, something I expected to be able to do.
Not clear... why cannot you achieve the same thing like this:
$this->form->field($someModel, 'somePropertyName')->widget(Select2::className(), [
'theme' => \kartik\widgets\Select2::THEME_BOOTSTRAP,
'data' => $someSelectOptions,
'options' => [],
'pluginOptions' => [
'allowClear' => true
]
])
Oh, right, I see what you mean. Okay, thanks for your time.
Scope
This pull request includes a
Changes
The following changes were made