I've managed to add a second action to the actions column in the admin product listing. It works fine until I add another column to the display. The dropdown menu doesn't "follow" the actions column and stays on the right :
Is there any way to fix this ? I'm running Magento 2.3.3
EDIT
Here's my code
etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!-- Plugin that adds an action to the default admin panel product listing -->
<type name="Magento\Catalog\Ui\Component\Listing\Columns\ProductActions">
<plugin name="pluginname" type="Vendor\Module\Plugins\AddStatsActionToProductListing" sortOrder="1" disabled="false" />
</type>
</config>
Plugin Class
public function afterPrepareDataSource(\Magento\Catalog\Ui\Component\Listing\Columns\ProductActions $subject, $result)
{
foreach ($result['data']['items'] as &$item) {
$item[$subject->getData('name')]['stats'] = [
'href' => $this->_urlBuilder->getUrl(
'vendor_module/groups_perproduct/index',
['product_id' => $item['entity_id']]
),
'label' => __('Stats'),
'hidden' => false,
'__disableTmpl' => true
];
}
return $result;
}