Hi there,
im currently struggling with the k-table
component. I am using an area dropdowns definition as follows:
'watched-files' => [
'label' => 'Dateiaufrufe',
'menu' => false,
'dialogs' => [...],
'dropdowns' => [
require __DIR__ . '/watched-files/dropdowns/options.php'
]
]
options.php
return [
'pattern' => 'watched-files/(:any)',
'action' => function ( $id ) {
// How to get the $id from the table row in which option was clicked
}
];
The vue-File with the k-table looks like this:
<k-table
:columns="{
name: { label: 'Dateiname', type: 'text' },
watched: { label: 'Angesehen', type: 'html', width: '1/6'}
}"
:rows="files"
:options="$dropdown('watched-files/'<ROW-INDEX-INFORMATION>)"
/>
Everything is fine. The Options Dropdown shows my options defined in the options.php file.
Question is: How can I get the rowIndex or id or whatever to identify which row option I have clicked, in order to do sth. with the row.
Of course I could build it with an v-for
with my own table, but I want to know how to get this done with the k-table
component.