kartik-v / yii2-widget-depdrop

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

Problems with depdrop inside modal #44

Closed felipepar closed 5 years ago

felipepar commented 7 years ago

Hello.

I'm having a strange issue when trying to use a Depdrop Widget inside a modal. I have a Kartik Gridview inside a modal, and when I click the 'update' button in a row, I hide the content currently in the modal and display the update form. The problem is, if I have a depdrop widget inside this form, I get the following error and the form never loads:

Uncaught TypeError: Cannot read property 'apply' of undefined
    at HTMLSelectElement.eval (eval at globalEval (jquery.js:343), <anonymous>:219:42)
    at Function.each (jquery.js:365)
    at jQuery.fn.init.each (jquery.js:137)
    at jQuery.fn.init.$.fn.depdrop (eval at globalEval (jquery.js:343), <anonymous>:206:14)
    at eval (eval at globalEval (jquery.js:343), <anonymous>:1:104)
    at eval (<anonymous>)
    at Function.globalEval (jquery.js:343)
    at domManip (jquery.js:5291)
    at jQuery.fn.init.append (jquery.js:5431)
    at jQuery.fn.init.<anonymous> (jquery.js:5525)

If I remove the depdrop widget, the form loads normally, and if I load the form outside of a modal it also works flawlessly.

ered15 commented 7 years ago

hi, @felipepar ,quick quesiton, did u find a solution for ur post? https://github.com/kartik-v/yii2-grid/issues/636 please let me knoe

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.