Skip to content

Commit

Permalink
Demo code issue #1953
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrecek234 committed Dec 20, 2022
1 parent e0e9b34 commit 1ef54bf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion demos/basic/button.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
Button::addTo($app, ['Click me'])->link(['index']);

// Without Seeding
$b1 = new Button('Click me (no seed)');
$b1 = new Button('Click me (error atkAjaxex');
$jsCallback = \Atk4\Ui\JsCallback::addTo($app)->set(function($jsCallback) {
return [new \Atk4\Ui\JsToast('Executed. But not closed modal...')];
});

$b1->on('click', null, null, ['confirm' => 'Really delete?'])->atkAjaxec([
'url' => $jsCallback]);

$app->add($b1);
// must be added first
$b1->link(['index']);
Expand Down

0 comments on commit 1ef54bf

Please sign in to comment.