TypeRocket / typerocket

TypeRocket is a highly integrated MVC WordPress framework with beautiful UI components for the modern developer.
https://typerocket.com
454 stars 62 forks source link

Custom mappings to Admin Table #216

Closed matteo-greco closed 5 years ago

matteo-greco commented 5 years ago

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?

kevindees commented 5 years ago

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