How to update widget with pjax in modal window in yii2

人走茶凉 提交于 2019-11-30 22:18:52

Managed without $.pjax, just added this

 $("#risks-solutions_order-sortable").append('<li data-id="'+data.id+'" data-key="'+data.id+'" draggable="true">'+data.solution+'</li>');
 $("ul[id$='sortable'").trigger('sortupdate');
 $('#risks-solutions_order-sortable').sortable( "refreshPositions" );

in ajax success and everything is ok! :)

IStranger

Perhaps increasing/disabling timeout may help to solve this problem.

$.pjax.reload('#solutionItems', {timeout : false});

More details you can find here: yii2 how to use pjax when hyperlink is not in pjax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!