Hi there,
I´m currently following the reference and advanced panel area recipe and was wondering how I am able to pass an vue(x) event after submitting my dialog?
The reference states, that it is possible by returning an array, but I can´t figure it out, how to get this accomplished.
How does the returning array has to look like from the dialog submit?
Kirby::plugin('yourname/todos', [
'areas' => [
'todos' => function ($kirby) {
return [
'dialogs' => [
'todos/create' => [
// ...
// the submit event is creating a POST route at
// `/panel/dialogs/{pattern}`;
// the submit button of the dialog is automatically
// wired to fire the POST request with the form
// data or whatever data the dialog provides
'submit' => function () {
$array = [
'event' => 'vuex event' ?,
'data' => 'data'
];
return $array;
}
]
]
];
}
]
]);
And how to access the returned data in a Vue single file component then?
Thanks for the help.