Closed bahrammzm closed 6 years ago
I don't have time to fix this issue now and I never used this extension with kartik/treemanager
. Can you fix this issue and submit PR for this issue?
How can disable pjax for form submit at all?
You need to create own view and override this property for Comment widget
i found the solution .
1- set a Flash message in actionCreate in DefaultController that store $commentModel->entityId
value
Yii::$app->session->setFlash('commentSaved', $commentModel->entityId);
2- set displayValue property in kartik/treemanager
with that Flash message
'displayValue' => (Yii::$app->session->hasFlash('commentSaved') ? Yii::$app->session->getFlash('commentSaved') : Tree::find()->min('id')),
3- replace $.pjax(pjaxSettings);
to location.reload();
in comment.js , function createComment
Nice!
I have used kartik/treemanager extension model for this extension . Everything work as well for initial node , but when i change the node of tree and after that submit the comment , comment button stuck in "loading..." and shows the below error . although comment saved in database .