{"action":"created","issue":{"url":"https://api.github.com/repos/kartik-v/yii2-dynagrid/issues/97","labels_url":"https://api.github.com/repos/kartik-v/yii2-dynagrid/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/kartik-v/yii2-dynagrid/issues/97/comments","events_url":"https://api.github.com/repos/kartik-v/yii2-dynagrid/issues/97/events","html_url":"https://github.com/kartik-v/yii2-dynagrid/issues/97","id":116313450,"number":97,"title":"EditableColumns not loading in the first time page is loaded but all works fine later","user":{"login":"ber5ien","id":854403,"avatar_url":"https://avatars.githubusercontent.com/u/854403?v=3","gravatar_id":"","url":"https://api.github.com/users/ber5ien","html_url":"https://github.com/ber5ien","followers_url":"https://api.github.com/users/ber5ien/followers","following_url":"https://api.github.com/users/ber5ien/following{/other_user}","gists_url":"https://api.github.com/users/ber5ien/gists{/gist_id}","starred_url":"https://api.github.com/users/ber5ien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ber5ien/subscriptions","organizations_url":"https://api.github.com/users/ber5ien/orgs","repos_url":"https://api.github.com/users/ber5ien/repos","events_url":"https://api.github.com/users/ber5ien/events{/privacy}","received_events_url":"https://api.github.com/users/ber5ien/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-11T11:22:03Z","updated_at":"2015-12-22T23:40:59Z","closed_at":"2015-12-22T17:45:40Z","body":"I am having the following issue. \r\n\r\n1. I load a page with my tickets.\r\n2. There is a filter set up as me. this is stored in gird configuration store.\r\n3. I press the cross to show all tickets not just me one.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/854403/11089941/e78dc5f4-8865-11e5-93f6-0ba40660a4f0.png)\r\n\r\nThe page is loading but the editable field are not being initialized and they cannot be clicked as per below example\r\n\r\n![image](https://cloud.githubusercontent.com/assets/854403/11089905/a550e766-8865-11e5-80a0-aa82bad1a983.png)\r\n\r\nIf i press F5 to refresh the page all is working fine with no issue i can then reset the grid to get a view default to me and press x to remove me. It works perfectly fine later on.\r\n\r\nI don't understand why I need to refresh the page when the page is being views first time to get this working.\r\n\r\nMany Thanks for your help.\r\n\r\nIt looks like the filed are not loaded because there is filter set.\r\n\r\nExample of editable columnt \r\n[\r\n        'class' => 'kartik\\grid\\EditableColumn',\r\n        'attribute'=>'company_id',         \r\n        'vAlign'=>'middle',\r\n        'width'=>'250px',   \r\n        'editableOptions'=> function ($model) use ($customerFilter) {\r\n            return [                \r\n                'header'=>'Customer', \r\n                'size'=>'md',     \r\n                'format' => 'link',\r\n                'asPopover' => true,       \r\n                'displayValueConfig' => $customerFilter,           \r\n                'inputType' => Editable::INPUT_SELECT2,\r\n                'options'=>[                    \r\n                        'theme' => 'krajee',\r\n                        'data' => $customerFilter,   \r\n                        'pluginOptions'=>[\r\n                               'allowClear' => true,\r\n                        ],\r\n                ],                                    \r\n            ];\r\n        },\r\n        'value'=>function ($model){           \r\n            if(isset($model->company_id) AND $model->company_id !=0){\r\n                return Html::a($model->company_id, ['customers/view','id' => $model->company_id], [\r\n                    'title'=>'View customer detail',                 \r\n                ]);                 \r\n            }else{\r\n                return \"(Not Set)\";\r\n            }\r\n        },      \r\n        'format'=>'raw',\r\n        'filterType'=>GridView::FILTER_SELECT2,\r\n        'filterWidgetOptions'=>[ \r\n                        'theme' => 'krajee',\r\n                        'options' => ['placeholder' => 'Customer ...'],\r\n                        'data' => $customerFilter,\r\n                        'pluginOptions'=>[\r\n                            'allowClear' => true,\r\n                        ],\r\n                    ],                \r\n        'noWrap'=>true,\r\n    ],"},"comment":{"url":"https://api.github.com/repos/kartik-v/yii2-dynagrid/issues/comments/166763068","html_url":"https://github.com/kartik-v/yii2-dynagrid/issues/97#issuecomment-166763068","issue_url":"https://api.github.com/repos/kartik-v/yii2-dynagrid/issues/97","id":166763068,"user":{"login":"ber5ien","id":854403,"avatar_url":"https://avatars.githubusercontent.com/u/854403?v=3","gravatar_id":"","url":"https://api.github.com/users/ber5ien","html_url":"https://github.com/ber5ien","followers_url":"https://api.github.com/users/ber5ien/followers","following_url":"https://api.github.com/users/ber5ien/following{/other_user}","gists_url":"https://api.github.com/users/ber5ien/gists{/gist_id}","starred_url":"https://api.github.com/users/ber5ien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ber5ien/subscriptions","organizations_url":"https://api.github.com/users/ber5ien/orgs","repos_url":"https://api.github.com/users/ber5ien/repos","events_url":"https://api.github.com/users/ber5ien/events{/privacy}","received_events_url":"https://api.github.com/users/ber5ien/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T23:40:59Z","updated_at":"2015-12-22T23:40:59Z","body":"I have tried without it and it would make any difference.\r\nI noticed that 4 asset are not loading by comparison both pages.\r\n\r\nPerhaps this is because the the page first is loaded without any data and then search is triggered using ajax so the assets are not loaded because of that.  \r\n\r\nIt would look like during the ajax request there is not check if the editable columnt exist and asset are not loaded.\r\n\r\nIs it possible force loading these assets even if on the page there is no editable column available?\r\n\r\nkartik\\editable\\EditableAsset\r\nsourcePath\t/var/www/tickets/vendor/kartik-v/yii2-editable/assets\r\nbasePath\t/var/www/tickets/web/assets/f78a12ea\r\nbaseUrl\t/assets/f78a12ea\r\ncss\t\r\ncss/editable.css\r\njs\t\r\njs/editable.js\r\ndepends\t\r\nyii\\web\\JqueryAsset\r\nyii\\web\\YiiAsset\r\nyii\\bootstrap\\BootstrapAsset\r\nkartik\\editable\\EditablePjaxAsset\r\nsourcePath\t/var/www/tickets/vendor/kartik-v/yii2-editable/assets\r\nbasePath\t/var/www/tickets/web/assets/f78a12ea\r\nbaseUrl\t/assets/f78a12ea\r\njs\t\r\njs/editable-pjax.js\r\ndepends\t\r\nyii\\web\\JqueryAsset\r\nyii\\web\\YiiAsset\r\nyii\\bootstrap\\BootstrapAsset"}}