-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
yii2 Select2 widget in form gets view render whole index in ajax with modal #364
Comments
Same problem here. Even if loading in ajax but not in modal.
(note, there's no need to echo) in a view which gets loaded without ajax. With this when the ajax view echoes the datecontrol widget i don't have the blink (probably there's some asset loading problem in ajax). |
The In any case, more a UX/UI design issue that you may want to check - where one option is you may try to ensure that ajax based loads always hide your parent container and rather show a loading indicator with everything else hidden and after everything is done (ajax is complete) - show back the main container. |
The other option is to avoid using renderAjax and use a normal renderPartial and rather use a PJAX Widget to dynamically render content and set |
Hi, i´m having some issues with the kartik library, I noticed that whe I put the kartik library in the form, wich is render in Ajax and showed in a modal, a strange blink happens in the screen when the modal is loaded... It works... but after that blink if I click outside the modal or close it and try to "view" any item, my whole index ends up in ajax.
This is my _form:
`
This is my controller:
`
the
echo "<script>window.history.back();</script>";
die;
is not part of the problem.
This is my view in the index after clicking on create/update, close the modal and click in view:
...I don´t really know how to put images here... so I think I will have to upload it somewhere and leave a link... sorry
https://drive.google.com/file/d/1zT9ToJyc5HnzHp-RoJu_DaF-TFyp2umz/view?usp=sharing
And the only thing I got is a warning in the console once it happens:
XMLHttpRequest.open @ index.php?r=cita:750 load (async) send @ jquery.js:9533 ajax @ jquery.js:9173 jQuery.fn.load @ jquery.js:9844 (anonymous) @ modal.js:23 dispatch @ jquery.js:5206 elemData.handle @ jquery.js:5014 [Deprecation] Synchronous XMLHttpRequest on the main thread is main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
At the end I just needed to put the ActiveFrom in the view and create a form, even if it´s empty, it will still work... however the black flash of the screen can be seen... do anybody knows how to solve it?
PS: I have other projects with the same libraries and this does not happens :(
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: