Skip to content

Commit

Permalink
Fix missing typecast in CRUD demo (#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Aug 13, 2024
1 parent ee0e11d commit 5cef498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/collection/crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
// because Crud inherits Grid, you can also define custom actions
$crud->addModalAction(['icon' => 'cogs'], 'Details', static function (View $p, $id) use ($crud) {
$model = Country::assertInstanceOf($crud->model);
Message::addTo($p, ['Details for: ' . $model->load($id)->name . ' (id: ' . $id . ')']);
Message::addTo($p, ['Details for: ' . $model->load($id)->name . ' (id: ' . $p->getApp()->uiPersistence->typecastSaveField($crud->model->getIdField(), $id) . ')']);
});

$column = $columns->addColumn();
Expand Down

0 comments on commit 5cef498

Please sign in to comment.