Closed faizalami closed 6 years ago
Set Select2::options['options']
as an associative array ...
for example check the second example in the Select2 documentation - advanced example demo - it shows how you can set disabled
attribute for each option... you can similarly set other HTML attributes.
Okay Thanks a lot
Prerequisites
master
branch of yii2-widget-select2.Steps to reproduce the issue
I need to use data- attribute for use another jQuery plugin, the plugin request data attribute for each options for example :
<option data-name="Name" data-address="Address" value="1">Person Name</option>
Expected behavior and actual behavior
I read the documentation and I can't find option for do that.
Environment
Browsers
Operating System
Libraries
Isolating the problem