From 35554c785fbe0ca408cb3e88f0be6505a3fe6656 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Fri, 5 Sep 2025 18:31:14 +0300 Subject: [PATCH] =?utf8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/records/MatrixTypeSearch.php | 1 + erp24/views/matrix-type/index.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/erp24/records/MatrixTypeSearch.php b/erp24/records/MatrixTypeSearch.php index d235f8fb..0aaffb53 100644 --- a/erp24/records/MatrixTypeSearch.php +++ b/erp24/records/MatrixTypeSearch.php @@ -52,6 +52,7 @@ class MatrixTypeSearch extends MatrixType 'allModels' => $filtered, 'pagination' => false, 'sort' => false, + 'key' => 'id', ]); } } \ No newline at end of file diff --git a/erp24/views/matrix-type/index.php b/erp24/views/matrix-type/index.php index cbfd577b..dd9e95c0 100644 --- a/erp24/views/matrix-type/index.php +++ b/erp24/views/matrix-type/index.php @@ -192,6 +192,12 @@ $this->registerJsFile('/js/matrix-type/index.js', ['position' => \yii\web\View:: ['class' => 'yii\grid\ActionColumn', 'template' => '{delete}', 'contentOptions' => ['class' => 'text-center', 'style' => 'width:80px; min-width:50px; '], + 'urlCreator' => function ($action, $model, $key, $index) { + if ($action === 'delete') { + return Url::to(['delete', 'id' => $model->id]); + } + return '#'; + }, 'buttons' => [ 'delete' => function ($url, $model, $key) { -- 2.39.5