-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
Is your feature request related to a problem? Please describe.
When viewing the plugin page on mobile the table shows only with the status icon as shown below:
Describe the solution you'd like
If you set a default column it will show like below:
Additional context
To make this happen you have to override the get_primary_column_name
function in MailAdminTable
and return the column name you want to set as primary. example below:
function get_primary_column_name() {
return 'email_to';
}
In this case it will show correctly but when the row is expanded it will display incorrectly since the primary column is no longer the first column (example below):
To fix this problem you need to move the status column so that email_to
is the first column after cb, like shown below
function get_columns()
{
$columns = [
'cb' => '<input type="checkbox" />',
'email_to' => __('To', 'WpMailCatcher'),
'subject' => __('Subject', 'WpMailCatcher'),
'email_from' => __('From', 'WpMailCatcher'),
'status' => '',
'time' => __('Sent', 'WpMailCatcher'),
'more_info' => ''
];
return $columns;
}