Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select 2 widget: maximium text on multiple selection to select all #367

Open
abelwamana opened this issue Jul 24, 2024 · 1 comment
Open

Comments

@abelwamana
Copy link

Hi.
I am using Tagging Support mult-select for your widget SELECT2 as "multiple => true", but when i have a lote of itens/text it can not be select all (Marcar todos), it stay disabled.
See my codifcation:

field($eventModel, 'participantes')->widget(Select2::classname(), [ 'data' => ArrayHelper::map(Contacto::find()->all(), 'email', function ($model) { return $model->nome . ' - ' . $model->instituicao; }), 'options' => ['placeholder' => 'Selecione os participantes...', 'multiple' => true, 'id' => 'select-participantes'], 'pluginOptions' => [ 'allowClear' => true, ], ]); ?>

Captura de ecrã 2024-07-24 170629

@abelwamana
Copy link
Author

I already found the solution, followed the error and changed the line: if (opts.length && opts[1]) to
if (opts && opts.length && opts[1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant