kartik-v / yii2-widget-depdrop

Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets).
Other
82 stars 39 forks source link

Compability with yii2-dynamicform #1

Closed XAKEPEHOK closed 9 years ago

XAKEPEHOK commented 9 years ago

There is an excellent ext https://github.com/wbraganca/yii2-dynamicform which support partial compability with many your widgets https://github.com/wbraganca/yii2-dynamicform/blob/master/assets/yii2-dynamic-form.js#L183 include Select2 and DerDrop. But this extension can't work with DerDrop and Select2 together (I mean DepDrop::TYPE_SELECT2)

As I understand it, if DerDrop and Select2 using together, is no way for get DepDrop params from select http://prntscr.com/59ti81 <=> http://prntscr.com/59tj0y

Can you fix it? May be add attr "data-plugin-params" with hash of DepDrop var?

P.S. Sorry for my english

kartik-v commented 9 years ago

The way its currently implemented only one plugin settings are stored for each input in the data variables. So if an input is first initialized by depdrop and then later with Select2 - the latter one overrides it.

This may need some BC breaking enhancement to store these differently. Will figure out and provide an update for this a bit later.

kartik-v commented 9 years ago

Related enhancement issue raised.