confusing of jquery-ui
lichunqiang opened this issue · 4 comments
lichunqiang commented
I'm confusing of the depends on jquery-ui. Is there any usage about it?
It is can be removed?
Thanks.
ihorchepurnyi commented
Hi, thanks for issue. Jquery-ui asset needed for selectize plugins, for example drag_drop
For example:
<?php
$values = ['test', 'test2'];
echo \yii2mod\selectize\Selectize::widget([
'name' => 'tag-selectize',
'options' => [
'data-data' => $values ? \yii\helpers\Json::encode($values) : null // Set default values
],
'pluginOptions' => [
// define list of plugins
'plugins' => ['drag_drop', 'remove_button'],
'persist' => false,
'createOnBlur' => true,
'create' => true
]
]);
?>
Without jquery-ui
dependency this widget doesn't be displayed.
lichunqiang commented
Thanks for your reply.
But If the user does not use the dnd feature, I think it should be not loaded.
ihorchepurnyi commented
Can you create PR for this feature?
lichunqiang commented
My pleasure.