I trying to implement dynamic status in admin sales grid under mass action,but unable to get this.
I was able to see the single mass action but not sub mass action under the sales mass action.
I tried many blogs but it didn't work.
I have used below two blogs but it is not coming as expected
http://webkul.com/blog/create-dynamic-mass-action-magento-2-grid/
I have added below snippit in view/adminhtml/ui_component/sales_order_grid.xml
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Ui/etc/ui_configuration.xsd">
<container name="listing_top">
<massaction name="listing_massaction">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="actions" xsi:type="array">
<item name="delete" xsi:type="array">
<item name="type" xsi:type="string">Status</item>
<item name="label" xsi:type="string" translate="true">Status</item>
<item name="url" xsi:type="string">sales/order/massStatus</item>
</item>
</item>
</item>
</argument>
</massaction>
</container>
Please help me to solve above problem.
Best Answer
To add the mass action, create the ui component and specify
Magento_Ui/js/grid/tree-massactions
massaction rendererapp\code\Magentoins\Pdfgenerator\view\adminhtml\ui_component\sales_order_grid.xml
Under the massaction class provide the action options in
jsonSerialize
app\code\Magentoins\Pdfgenerator\Ui\Component\Sales\Order\MassAction\Pdftemplates.php