TypeRocket/typerocket

Custom mappings to Admin Table

matteo-greco opened this issue · 1 comments

I'm using some custom mappings on an admin page, likes this:

tr_page(...)
->mapActions(
	[
		'GET'  => 'gestisci',
		'POST' => 'invia',
	]
);

I'd like to call on them from an Admin Table, like this:

$table = tr_tables();
$table->setColumns(
	'mittente_nome',
	[
		'mittente_nome'   => [
			...
			'actions' => [ 'gestisci' ],
			...
		],
	...
	]
);

However, that doesn't seem to work, as the admin table has no actions and nothing can be clicked. I noticed that the Table class does a switch on the action and only handles "edit", "delete" and "view".

Can this be done in typerocket?

Hey @matteo-greco

There is no feature for what you are requesting yet. I'll look into what it might take to add the feature though.

Thanks,
Kevin